Repository navigation
Conversation
WithinPenultimateLevelOutputRange()WithinPenultimateLevelOutputRange()
|
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
ajkr
left a comment
There was a problem hiding this comment.
Unsafe to store Seq later than snapshot in the last level if per_key_placement is enabled
Do you know why it's unsafe?
https://github.com/facebook/rocksdb/pull/9964/files#r1024745198 - pretty non-obvious |
Thanks for digging this up, I did not remember it. It seems it could be safe now since we don't allow preclude_last_level_data_seconds to be dynamically changeable. |
…#12081) Summary: `WithinPenultimateLevelOutputRange()` is updated in meta#12063 to check internal key range. However, op_type of a key can change during compaction, e.g. MERGE -> PUT, which makes a key larger and becomes out of penultimate output range. This has caused stress test failures with error message "Unsafe to store Seq later than snapshot in the last level if per_key_placement is enabled". So update `WithinPenultimateLevelOutputRange()` to only check user key and sequence number. Pull Request resolved: meta#12081 Test Plan: * This repro can produce the corruption within a few runs. Ran it a few times after the fix and did not see Corruption failure. ``` python3 ./tools/db_crashtest.py whitebox --test_tiered_storage --random_kill_odd=888887 --use_merge=1 --writepercent=100 --readpercent=0 --prefixpercent=0 --delpercent=0 --delrangepercent=0 --iterpercent=0 --write_buffer_size=419430 --column_families=1 --read_fault_one_in=0 --write_fault_one_in=0 ``` Reviewed By: ajkr Differential Revision: D51481202 Pulled By: cbi42 fbshipit-source-id: cad6b65099733e03071b496e752bbdb09cf4db82
WithinPenultimateLevelOutputRange()is updated in #12063 to check internal key range. However, op_type of a key can change during compaction, e.g. MERGE -> PUT, which makes a key larger and becomes out of penultimate output range. This has caused stress test failures with error message "Unsafe to store Seq later than snapshot in the last level if per_key_placement is enabled". So updateWithinPenultimateLevelOutputRange()to only check user key and sequence number.Test plan: