]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix an assertion failure in `CompactionOutputs::AddRangeDels()` (#11040)
authorChangyu Bi <changyubi@meta.com>
Tue, 20 Dec 2022 00:36:39 +0000 (16:36 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 20 Dec 2022 00:36:39 +0000 (16:36 -0800)
commit53b703eafef16c20bad64171f1dcca8cc98eefa0
tree1f8afa930611cbf6951a33577e3b4704462547e2
parentddad943c2972059393802b114414bd2b573d4621
Fix an assertion failure in `CompactionOutputs::AddRangeDels()` (#11040)

Summary:
the [assertion](https://github.com/facebook/rocksdb/blob/c3f720c60db59c27486d8f18e094f9d1eb3c33cf/db/compaction/compaction_outputs.cc#L643) in `CompactionOutputs::AddRangeDels()` can fail after https://github.com/facebook/rocksdb/pull/10802. The assertion fails when `lower_bound_from_range_tombstone` is true during `AddRangeDels()` for a new compaction output file, while the lower bound range tombstone key has seqno 0 and op_type kTypeRangeDeletion. It can have seqno 0 when it was truncated at a point key whose seqno was zeroed out during compaction, the seqno and op_type could be set [here](https://github.com/facebook/rocksdb/blob/c3f720c60db59c27486d8f18e094f9d1eb3c33cf/db/compaction/compaction_outputs.cc#L594). This PR fixes the assertion excluding the case when `lower_bound_from_range_tombstone` is true.

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

Test Plan: CI

Reviewed By: ajkr

Differential Revision: D42119914

Pulled By: cbi42

fbshipit-source-id: 0897e71b5304cb02aac30f71667b590c37b72baf
db/compaction/compaction_outputs.cc