Skip to content

Commit

Permalink
MB-37920: Remove @todo in EPBucket::flushVBucket
Browse files Browse the repository at this point in the history
Just a leftover, MB-37920 already fixed.

Change-Id: Ibd10fdaf827c8ed7a2873d0e4bc4d90f2b313778
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/144441
Reviewed-by: Trond Norbye <trond.norbye@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
  • Loading branch information
paolococchi committed Jan 27, 2021
1 parent 3d768cc commit 64b679d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions engines/ep/src/ep_bucket.cc
Expand Up @@ -722,16 +722,6 @@ EPBucket::FlushResult EPBucket::flushVBucket(Vbid vbid) {

// Are we flushing only a new vbstate?
if (mustPersistVBState && (flushBatchSize == 0)) {
// @todo MB-37920: This call potentially does 2 things:
// 1) update the cached vbstate
// 2) persisted the new vbstate
// The function returns false if the operation fails. But, (1) may
// succeed and (2) may fail, which makes function to return false.
// In that case we do not rollback the cached vbstate, which exposes
// a wrong on-disk state at that point.
// Also, when we re-attempt to flush a set-vbstate item we may fail
// again because of the optimization at
// vbucket_state::needsToBePersisted().
if (!rwUnderlying->snapshotVBucket(vbid, commitData.proposedVBState)) {
// Flush failed, we need to reset the pcursor to the original
// position. At the next run the flusher will re-attempt by
Expand Down

0 comments on commit 64b679d

Please sign in to comment.