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
This commit is contained in:
Peter (Stig) Edwards 2019-02-11 17:46:49 -08:00 committed by Facebook Github Bot
parent d6b9b3b884
commit 79496d71ed
2 changed files with 3 additions and 0 deletions

View File

@ -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.

View File

@ -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);