From 25b08eb4386768b05a0748bfdb505ab58921281a Mon Sep 17 00:00:00 2001 From: leipeng Date: Mon, 3 Jul 2023 15:05:38 -0700 Subject: [PATCH] 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 --- db/memtable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/memtable.cc b/db/memtable.cc index 3801b67a9..dfef13a15 100644 --- a/db/memtable.cc +++ b/db/memtable.cc @@ -810,7 +810,7 @@ Status MemTable::Add(SequenceNumber s, ValueType type, earliest_seqno_.load(std::memory_order_relaxed); while ( (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) {