@@ -193,10 +193,6 @@ void EphemeralVBucket::addStats(VBucketStatsDetailLevel detail,
193193 add_stat,
194194 c);
195195 addStat (" seqlist_high_seqno" , seqList->getHighSeqno (), add_stat, c);
196- addStat (" seqlist_highest_deduped_seqno" ,
197- seqList->getHighestDedupedSeqno (),
198- add_stat,
199- c);
200196 addStat (" seqlist_purged_count" , seqListPurgeCount.load (), add_stat, c);
201197
202198 uint64_t rr_begin, rr_end;
@@ -395,17 +391,15 @@ EphemeralVBucket::updateStoredValue(const HashTable::HashBucketLock& hbl,
395391
396392 std::lock_guard<std::mutex> lh (sequenceLock);
397393
398- const bool wasTemp = v.isTempItem ();
399394 const bool oldValueDeleted = v.isDeleted ();
400395 const bool recreatingDeletedItem = v.isDeleted () && !itm.isDeleted ();
401396
402397 StoredValue::UniquePtr ownedSv;
403398
404399 {
405- // Once we update the seqList, there is a short period where the
406- // highSeqno and highestDedupedSeqno are both incorrect. We have to hold
407- // this lock to prevent a new rangeRead starting, and covering an
408- // inconsistent range.
400+ // Once we update the seqList, there is a short period where highSeqno
401+ // is incorrect. We have to hold this lock to prevent a new rangeRead
402+ // starting, and covering an inconsistent range.
409403 std::lock_guard<std::mutex> listWriteLg (seqList->getListWriteLock ());
410404
411405 /* Update in the Ordered data structure (seqList) first and then update
@@ -451,12 +445,6 @@ EphemeralVBucket::updateStoredValue(const HashTable::HashBucketLock& hbl,
451445
452446 seqList->maybeUpdateMaxVisibleSeqno (lh, listWriteLg, osv);
453447
454- /* Temp items are never added to the seqList, hence updating a temp
455- item should not update the deduped seqno */
456- if (!wasTemp) {
457- seqList->updateHighestDedupedSeqno (listWriteLg, osv);
458- }
459-
460448 if (res == SequenceList::UpdateStatus::Append) {
461449 /* Mark the un-updated storedValue as stale. This must be done after
462450 the new storedvalue for the item is visible for range read in the
@@ -555,10 +543,9 @@ EphemeralVBucket::softDeleteStoredValue(const HashTable::HashBucketLock& hbl,
555543
556544 VBNotifyCtx notifyCtx;
557545 {
558- // Once we update the seqList, there is a short period where the
559- // highSeqno and highestDedupedSeqno are both incorrect. We have to hold
560- // this lock to prevent a new rangeRead starting, and covering an
561- // inconsistent range.
546+ // Once we update the seqList, there is a short period where highSeqno
547+ // is incorrect. We have to hold this lock to prevent a new rangeRead
548+ // starting, and covering an inconsistent range.
562549 std::lock_guard<std::mutex> listWriteLg (seqList->getListWriteLock ());
563550
564551 /* Update the in the Ordered data structure (seqList) first and then
@@ -618,12 +605,6 @@ EphemeralVBucket::softDeleteStoredValue(const HashTable::HashBucketLock& hbl,
618605
619606 seqList->maybeUpdateMaxVisibleSeqno (lh, listWriteLg, osv);
620607
621- /* Temp items are never added to the seqList, hence updating a temp
622- item should not update the deduped seqno */
623- if (wasCommittedNonTemp) {
624- seqList->updateHighestDedupedSeqno (listWriteLg, osv);
625- }
626-
627608 if (res == SequenceList::UpdateStatus::Append) {
628609 /* Mark the un-updated storedValue as stale. This must be done after
629610 the new storedvalue for the item is visible for range read in the
@@ -782,11 +763,6 @@ VBNotifyCtx EphemeralVBucket::abortStoredValue(
782763 if (res == SequenceList::UpdateStatus::Append) {
783764 seqList->markItemStale (listWriteLg, std::move (oldSv), newSv);
784765 }
785-
786- // We de-duped a prepare so we need to update the highest deduped seqno
787- // to prevent a backfill range read from ending without reaching this
788- // abort
789- seqList->updateHighestDedupedSeqno (listWriteLg, osv);
790766 }
791767
792768 return notifyCtx;
0 commit comments