rocksdb/db/compaction
Jay Huh 57a8e69d4e Include TableProperties in the CompactionServiceResult (#13089)
Summary:
In Remote Compactions, the primary host receives the serialized compaction result from the remote worker and deserializes it to build the output. Unlike Local Compactions, where table properties are built by TableBuilder, in Remote Compactions, these properties were not included in the serialized compaction result. This was likely done intentionally since the table properties are already available in the SST files.

Because TableProperties are not populated as part of CompactionOutputs for remote compactions, we were unable to log the table properties in OnCompactionComplete and use them for verification. We are adding the TableProperties as part of the CompactionServiceOutputFile in this PR. By including the TableProperties in the serialized compaction result, the primary host will be able to access them and verify that they match the values read from the actual SST files.

We are also adding the populating `format_version` in table_properties of in TableBuilder.  This has not been a big issue because the `format_version` is written to the SST files directly from `TableOptions.format_version`. When loaded from the SST files, it's populated directly by reading from the MetaBlock. This info has only been missing in the TableBuilder's Rep.props.

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

Test Plan:
```
./compaction_job_test
```
```
./compaction_service_test
```

Reviewed By: pdillinger

Differential Revision: D64878740

Pulled By: jaykorean

fbshipit-source-id: b6f2fdce851e6477ecb4dd5a87cdc62e176b746b
2024-10-25 13:13:12 -07:00
..
clipping_iterator.h Refactor AddRangeDels() + consider range tombstone during compaction file cutting (#11113) 2023-02-22 12:28:18 -08:00
clipping_iterator_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
compaction.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction.h Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_iteration_stats.h Add initial support for TimedPut API (#12419) 2024-03-14 15:44:55 -07:00
compaction_iterator.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_iterator.h Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_iterator_test.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_job.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_job.h Include TableProperties in the CompactionServiceResult (#13089) 2024-10-25 13:13:12 -07:00
compaction_job_stats_test.cc Replace ScopedArenaIterator with ScopedArenaPtr<InternalIterator> (#12470) 2024-03-22 13:40:42 -07:00
compaction_job_test.cc Include TableProperties in the CompactionServiceResult (#13089) 2024-10-25 13:13:12 -07:00
compaction_outputs.cc Preserve TimedPut on penultimate level until it actually expires (#12543) 2024-04-30 11:16:02 -07:00
compaction_outputs.h Include TableProperties in the CompactionServiceResult (#13089) 2024-10-25 13:13:12 -07:00
compaction_picker.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker.h Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_fifo.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_fifo.h Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_level.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_level.h Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_test.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_universal.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_picker_universal.h Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
compaction_service_job.cc Include TableProperties in the CompactionServiceResult (#13089) 2024-10-25 13:13:12 -07:00
compaction_service_test.cc Fix Compaction Stats (#13071) 2024-10-16 19:20:37 -07:00
compaction_state.cc Fix Compaction Stats (#13071) 2024-10-16 19:20:37 -07:00
compaction_state.h Tiered Compaction: per key placement support (#9964) 2022-07-13 20:54:49 -07:00
file_pri.h Avoid shifting component too large error in FileTtlBooster (#11673) 2023-08-04 14:29:50 -07:00
sst_partitioner.cc Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00
subcompaction_state.cc Fix Compaction Stats (#13071) 2024-10-16 19:20:37 -07:00
subcompaction_state.h Fix Compaction Stats (#13071) 2024-10-16 19:20:37 -07:00
tiered_compaction_test.cc Fix a bug for surfacing write unix time (#13057) 2024-10-08 11:31:51 -07:00