rocksdb/db/compaction
Zhichao Cao 4369f2c7bb Checksum for each SST file and stores in MANIFEST (#6216)
Summary:
In the current code base, RocksDB generate the checksum for each block and verify the checksum at usage. Current PR enable SST file checksum. After a SST file is generated by Flush or Compaction, RocksDB generate the SST file checksum and store the checksum value and checksum method name in the vs_info and MANIFEST as part for the FileMetadata.

Added the enable_sst_file_checksum to Options to enable or disable file checksum. Added sst_file_checksum to Options such that user can plugin their own SST file checksum calculate method via overriding the SstFileChecksum class. The checksum information inlcuding uint32_t checksum value and a checksum name (string).  A new tool is added to LDB such that user can dump out a list of file checksum information from MANIFEST. If user enables the file checksum but does not provide the sst_file_checksum instance, RocksDB will use the default crc32checksum implemented in table/sst_file_checksum_crc32c.h
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6216

Test Plan: Added the testing case in table_test and ldb_cmd_test to verify checksum is correct in different level. Pass make asan_check.

Differential Revision: D19171461

Pulled By: zhichao-cao

fbshipit-source-id: b2e53479eefc5bb0437189eaa1941670e5ba8b87
2020-02-10 15:52:52 -08:00
..
compaction_iteration_stats.h Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
compaction_iterator_test.cc Fixes for g++ 4.9.2 compatibility (#6053) 2019-11-19 15:43:37 -08:00
compaction_iterator.cc Set CompactionIterator::valid_ to false when PrepareBlobOutput indicates error 2019-12-17 10:20:16 -08:00
compaction_iterator.h Turn compaction asserts to runtime check (#5935) 2019-10-30 13:48:38 -07:00
compaction_job_stats_test.cc Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
compaction_job_test.cc Checksum for each SST file and stores in MANIFEST (#6216) 2020-02-10 15:52:52 -08:00
compaction_job.cc Checksum for each SST file and stores in MANIFEST (#6216) 2020-02-10 15:52:52 -08:00
compaction_job.h Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
compaction_picker_fifo.cc Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_fifo.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_level.cc Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_level.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker_test.cc Checksum for each SST file and stores in MANIFEST (#6216) 2020-02-10 15:52:52 -08:00
compaction_picker_universal.cc Fix UniversalCompaction trivial move bug (#6067) 2019-12-11 11:27:53 -08:00
compaction_picker_universal.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction_picker.cc fix unstable unittest caused by #5958 (#6061) 2019-11-21 15:24:01 -08:00
compaction_picker.h Fix corruption with intra-L0 on ingested files (#5958) 2019-11-19 15:09:11 -08:00
compaction.cc Consider all compaction input files to compute the oldest ancestor time (#6279) 2020-01-10 19:02:42 -08:00
compaction.h Support options.ttl with options.max_open_files = -1 (#6060) 2019-11-22 21:23:00 -08:00