Details
-
Bug
-
Resolution: User Error
-
Major
-
7.1.0
-
Untriaged
-
1
-
Unknown
Description
Found with NexusKVStore. If we set the MagmaKVStoreConfig to checkpoint every batch (Sync(true) after every WriteDocs call) then the rollback points offered by magma don't quite make sense. In the case the max checkpoints is set to 5 and 2 appear to exist, one with seqno 10 and one with seqno 5. The rollback when run with NexusKVStore fails as couchstore can rollback to seqno 9 and magma only to seqno 5. I believe that with this config magma should be able to rollback to seqno 9 too.
Unit test excerpt:
setVBucketStateAndRunPersistTask(
|
vbid,
|
vbucket_state_active,
|
{{"topology", nlohmann::json::array({{"active", "replica"}})}});
|
|
for (int i = 0; i < 10; i++) {
|
store_item(
|
vbid, makeStoredDocKey("key" + std::to_string(i)), "value");
|
flushVBucketToDiskIfPersistent(vbid, 1);
|
}
|
|
setVBucketStateAndRunPersistTask(vbid, vbucket_state_replica);
|
|
class RollbackCallback : public RollbackCB {
|
void callback(GetValue& val) override {
|
}
|
};
|
|
auto* kvstore = store->getRWUnderlying(vbid);
|
auto rollbackResult = kvstore->rollback(
|
Vbid(0), 9, std::make_unique<RollbackCallback>());
|
Attachments
Issue Links
- relates to
-
MB-47604 NexusKVStore implementation
- Closed
For Gerrit Dashboard: MB-48660 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
162555,1 | MB-48660: Test | master | kv_engine | Status: ABANDONED | 0 | 0 |
162587,4 | MB-48660: Rename magma_checkpoint_every_batch | master | kv_engine | Status: MERGED | +2 | +1 |