MemTable::Add: first_seqno_.compare_exchange_weak to earliest_seqno_ (#11398)

Summary:
This should be a benign bug caused by a long lived typo, this PR fix this issue.

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

Reviewed By: ajkr

Differential Revision: D47163379

Pulled By: cbi42

fbshipit-source-id: 531728cae496fd7ac1371bbbd64fc103c3a90dcf
oxigraph-main
leipeng 1 year ago committed by Facebook GitHub Bot
parent f4e304f987
commit 25b08eb438
  1. 2
      db/memtable.cc

@ -810,7 +810,7 @@ Status MemTable::Add(SequenceNumber s, ValueType type,
earliest_seqno_.load(std::memory_order_relaxed); earliest_seqno_.load(std::memory_order_relaxed);
while ( while (
(cur_earliest_seqno == kMaxSequenceNumber || s < cur_earliest_seqno) && (cur_earliest_seqno == kMaxSequenceNumber || s < cur_earliest_seqno) &&
!first_seqno_.compare_exchange_weak(cur_earliest_seqno, s)) { !earliest_seqno_.compare_exchange_weak(cur_earliest_seqno, s)) {
} }
} }
if (type == kTypeRangeDeletion) { if (type == kTypeRangeDeletion) {

Loading…
Cancel
Save