Skip to content

Commit

Permalink
MB-51805: Merge branch neo
Browse files Browse the repository at this point in the history
* commit 'b05dfad6d':
  MB-51805: Add highestTracked to DM interface
  MB-51805: Do not notify pdm in ReceiveDuplicateDcpPrepareRemoveFromPDM

Change-Id: Iadb8eca078520b11163957b537c8365cfdc8f7ab
  • Loading branch information
daverigby committed May 20, 2022
2 parents f98bac7 + b05dfad commit 7372869
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion engines/ep/src/durability/active_durability_monitor.h
Expand Up @@ -168,7 +168,7 @@ class ActiveDurabilityMonitor : public DurabilityMonitor {
int64_t getHighCompletedSeqno() const override;

/// @returns highest tracked seqno
int64_t getHighestTrackedSeqno() const;
int64_t getHighestTrackedSeqno() const override;

/**
* @return true if the replication topology allows Majority being reached,
Expand Down
5 changes: 5 additions & 0 deletions engines/ep/src/durability/durability_monitor.h
Expand Up @@ -36,6 +36,11 @@ class DurabilityMonitor {

virtual int64_t getHighCompletedSeqno() const = 0;

/**
* Get the highest seqno of a prepare that this DM is tracking
*/
virtual int64_t getHighestTrackedSeqno() const = 0;

/**
* @return the number of pending SyncWrite(s) currently tracked
*/
Expand Down
7 changes: 1 addition & 6 deletions engines/ep/src/durability/passive_durability_monitor.h
Expand Up @@ -176,12 +176,7 @@ class PassiveDurabilityMonitor : public DurabilityMonitor {
*/
void notifyLocalPersistence() override;

/**
* Get the highest seqno for which there is a SyncWrite in trackedWrites.
* Returns 0 if trackedWrites is empty.
*
*/
int64_t getHighestTrackedSeqno() const;
int64_t getHighestTrackedSeqno() const override;

void dump() const override;

Expand Down
4 changes: 0 additions & 4 deletions engines/ep/tests/module_tests/dcp_durability_stream_test.cc
Expand Up @@ -2351,10 +2351,6 @@ TEST_P(DurabilityPassiveStreamTest, ReceiveDuplicateDcpPrepareRemoveFromPDM) {
auto& pdm = VBucketTestIntrospector::public_getPassiveDM(*vb);
if (persistent()) {
EXPECT_EQ(1, pdm.getNumTracked());

// As we have a disk checkpoint we need to receive snap end and persist
// the snap
pdm.notifySnapshotEndReceived(4);
flushVBucketToDiskIfPersistent(vbid, 3);
}

Expand Down

0 comments on commit 7372869

Please sign in to comment.