Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0
-
Untriaged
-
1
-
Yes
Description
Reproduction
- Create two collections, c1 and c2
- Create a mutation to key 'A' in c1 and c2
- Do a backup
- Create a mutation 'B' in c1 and c2
- Delete c2
- Do a backup
- Do a restore/merge
What should happen
The merge or restore should complete and contain just 'A' and 'B' in c1
What actually happens
The merge/restore correctly transfers data from the first backup but during the second backup fails with a message such as:
Error merging data: snapshot marker for vBucket 55 isn't valid {Timestamp:0 Start:0 End:5} -> {Timestamp:0 Start:4 End:6} |
During a merge/restore we only transfer the data that will exist at the end, so if you delete a collection the mutations from it won't be transferred. We therefore advance the seqno to take account of any mutations in a deleted collection that happen after the last transferred mutation. Up to here the behaviour is correct. At the end of a transfer however we will flush the writer and then persist the last committed seqno - but this can be lower than the seqno we've advanced forward.
In the example above we have the following mutations:
backup 1:
|
4 - c1 A
|
5 - c2 A
|
backup 2:
|
6 - delete c1
|
so here we will advance to seqno 5 to take account of the creation of A in c2, but the last committed seqno will be 4 as it is the last mutation in an alive collection - ie one that we transfer.
Attachments
Issue Links
For Gerrit Dashboard: MB-52011 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
174424,1 | MB-52011 Persist max of last committed seqno or sink high seqno | neo | backup | Status: ABANDONED | 0 | -1 |
174524,6 | MB-52011 Revert back to previous method of handling seqno-advance | neo | backup | Status: MERGED | +2 | +1 |
174787,1 | Merge branch 'neo' into master | master | backup | Status: MERGED | +2 | +1 |
174791,5 | MB-52011 Correctly supply the latest UUID when creating DCP streams | neo | backup | Status: MERGED | +2 | +1 |
174794,1 | Merge branch 'neo' into master | master | backup | Status: MERGED | +2 | +1 |