rocksdb/table
Andrew Kryczka b7fbcefda8 Add API to limit blast radius of merge operator failure (#11092)
Summary:
Prior to this PR, `FullMergeV2()` can only return `false` to indicate failure, which causes any operation invoking it to fail. During a compaction, such a failure causes the compaction to fail and causes the DB to irreversibly enter read-only mode. Some users asked for a way to allow the merge operator to fail without such widespread damage.

To limit the blast radius of merge operator failures, this PR introduces the `MergeOperationOutput::op_failure_scope` API. When unpopulated (`kDefault`) or set to `kTryMerge`, the merge operator failure handling is the same as before. When set to `kMustMerge`, merge operator failure still causes failure to operations that must merge (`Get()`, iterator, `MultiGet()`, etc.). However, under `kMustMerge`, flushes/compactions can survive merge operator failures by outputting the unmerged input operands.

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

Reviewed By: siying

Differential Revision: D42525673

Pulled By: ajkr

fbshipit-source-id: 951dc3bf190f86347dccf3381be967565cda52ee
2023-01-20 14:40:30 -08:00
..
adaptive Improve error messages for SST footer and size errors (#11009) 2022-12-09 10:03:47 -08:00
block_based Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
cuckoo Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
plain Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_fetcher.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_fetcher.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_fetcher_test.cc Improve error messages for SST footer and size errors (#11009) 2022-12-09 10:03:47 -08:00
cleanable_test.cc Eliminate unnecessary (slow) block cache Ref()ing in MultiGet (#9899) 2022-04-26 21:59:24 -07:00
format.cc Improve error messages for SST footer and size errors (#11009) 2022-12-09 10:03:47 -08:00
format.h Major Cache refactoring, CPU efficiency improvement (#10975) 2023-01-11 14:20:40 -08:00
get_context.cc Add API to limit blast radius of merge operator failure (#11092) 2023-01-20 14:40:30 -08:00
get_context.h Support Merge for wide-column entities during point lookups (#10916) 2022-11-03 08:35:42 -07:00
internal_iterator.h remove unused InternalIteratorBase::is_mutable_ (#11104) 2023-01-19 13:28:58 -08:00
iter_heap.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
iterator.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
iterator_wrapper.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
merger_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
merging_iterator.cc Revert #10802 Consider range tombstone in compaction output file cutting (#11089) 2023-01-13 12:28:21 -08:00
merging_iterator.h Revert #10802 Consider range tombstone in compaction output file cutting (#11089) 2023-01-13 12:28:21 -08:00
meta_blocks.cc Improve error messages for SST footer and size errors (#11009) 2022-12-09 10:03:47 -08:00
meta_blocks.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
mock_table.cc Align compaction output file boundaries to the next level ones (#10655) 2022-09-29 19:43:55 -07:00
mock_table.h Align compaction output file boundaries to the next level ones (#10655) 2022-09-29 19:43:55 -07:00
multiget_context.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
persistent_cache_helper.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
persistent_cache_helper.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
persistent_cache_options.h Use STATIC_AVOID_DESTRUCTION for static objects with non-trivial destructors (#9958) 2022-05-17 09:39:22 -07:00
scoped_arena_iterator.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
sst_file_dumper.cc Improve error messages for SST footer and size errors (#11009) 2022-12-09 10:03:47 -08:00
sst_file_dumper.h Support using ZDICT_finalizeDictionary to generate zstd dictionary (#9857) 2022-05-20 12:09:09 -07:00
sst_file_reader.cc Remove range tombstone test code from sst_file_reader (#10847) 2022-10-23 20:17:14 -07:00
sst_file_reader_test.cc Remove range tombstone test code from sst_file_reader (#10847) 2022-10-23 20:17:14 -07:00
sst_file_writer.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
sst_file_writer_collectors.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
table_builder.h Always verify SST unique IDs on SST file open (#10532) 2022-09-07 22:52:42 -07:00
table_factory.cc Restore Regex support for ObjectLibrary::Register, rename new APIs to allow old one to be deprecated in the future (#9362) 2022-01-11 06:33:48 -08:00
table_properties.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
table_properties_internal.h Improve / clean up meta block code & integrity (#9163) 2021-11-18 11:43:44 -08:00
table_reader.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
table_reader_bench.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
table_test.cc Improve error messages for SST footer and size errors (#11009) 2022-12-09 10:03:47 -08:00
two_level_iterator.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
two_level_iterator.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
unique_id.cc Derive cache keys from SST unique IDs (#10394) 2022-08-12 13:49:49 -07:00
unique_id_impl.h Derive cache keys from SST unique IDs (#10394) 2022-08-12 13:49:49 -07:00