rocksdb/table/plain
Jay Huh 0a43d8a261 Verify compaction output record count (#13455)
Summary:
Continuing cbi42 's work in 602cc0f9a4be89020fb870dba2816f11dd515d16.

In this PR, we are adding record count verification for each compaction by comparing number of entries summed from Table Properties with the number of output records from the compaction stats.

If the count does not match, `Status::Corruption(msg)` is returned with detailed message including the actual number (from table property) and the expected number (from compaction stats)

Pull Request resolved: https://github.com/facebook/rocksdb/pull/13455

Test Plan:
New UT added
```
./db_compaction_test -- --gtest_filter="*Verify*"
```

The check had to be disabled for some of the existing tests using MockTable/MockTableFactory, because TableProperties aren't populated properly for the MockTables.

Reviewed By: hx235

Differential Revision: D71235790

Pulled By: jaykorean

fbshipit-source-id: 3a86a878d13e79d948409d6a9843d1c992d2c98e
2025-03-18 18:40:33 -07:00
..
plain_table_bloom.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
plain_table_bloom.h Meta-internal folly integration with F14FastMap (#9546) 2022-04-13 07:34:01 -07:00
plain_table_builder.cc Verify compaction output record count (#13455) 2025-03-18 18:40:33 -07:00
plain_table_builder.h Rename IntTblPropCollector -> InternalTblPropColl (#12320) 2024-02-02 14:14:43 -08:00
plain_table_factory.cc Rename IntTblPropCollector -> InternalTblPropColl (#12320) 2024-02-02 14:14:43 -08:00
plain_table_factory.h Fix race to make BlockBasedTableOptions effectively mutable (#13082) 2024-10-25 10:24:54 -07:00
plain_table_index.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
plain_table_index.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
plain_table_key_coding.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
plain_table_key_coding.h Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
plain_table_reader.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
plain_table_reader.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00