Increment NUMBER_BLOCK_NOT_COMPRESSED when !GoodCompressionRatio (#4929)

Summary:
See https://github.com/facebook/rocksdb/issues/4884
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4929

Differential Revision: D14028333

Pulled By: sagar0

fbshipit-source-id: eed12bceae85385a34aaa6dd303bf0f53c4c7b06
main
Peter (Stig) Edwards 6 years ago committed by Facebook Github Bot
parent d6b9b3b884
commit 79496d71ed
  1. 1
      HISTORY.md
  2. 2
      table/block_based_table_builder.cc

@ -22,6 +22,7 @@
* Deleting Blob files also go through SStFileManager.
* Remove PlainTable's store_index_in_file feature. When opening an existing DB with index in SST files, the index and bloom filter will still be rebuild while SST files are opened, in the same way as there is no index in the file.
* Remove CuckooHash memtable.
* The counter stat `number.block.not_compressed` now also counts blocks not compressed due to poor compression ratio.
### Bug Fixes
* Fix a deadlock caused by compaction and file ingestion waiting for each other in the event of write stalls.

@ -581,6 +581,8 @@ void BlockBasedTableBuilder::WriteBlock(const Slice& raw_block_contents,
MeasureTime(r->ioptions.statistics, BYTES_COMPRESSED,
raw_block_contents.size());
RecordTick(r->ioptions.statistics, NUMBER_BLOCK_COMPRESSED);
} else if (type != r->compression_type) {
RecordTick(r->ioptions.statistics, NUMBER_BLOCK_NOT_COMPRESSED);
}
WriteRawBlock(block_contents, type, handle, is_data_block);

Loading…
Cancel
Save