Details
-
Bug
-
Resolution: Fixed
-
Major
-
master
-
Triaged
-
Unknown
-
KV Sprint 2020-January
Description
The 'seqno stats' test in the 'ep_testsuite.full_eviction' testsuite fails when doing the following:
wait_for_flusher_to_settle(h, h1);
|
..
|
if (isPersistentBucket(h, h1)) {
|
checkeq(100,
|
get_int_stat(h, h1, "vb_0:last_persisted_seqno", "vbucket-seqno"),
|
"Unexpected last_persisted_seqno");
|
}
|
And, the `wait_for_flusher_to_settle` function in 'ep_test_apis.cc' does this:
wait_for_stat_to_be(h, h1, "ep_flusher_todo", 0);
|
This issue has been reported as rocksdb-related in MB-25989 :
ep_testsuite.full_eviction.rocksdb:
|
|
Running [0051/0158]: seqno stats (couchstore).../home/couchbase/jenkins/workspace/kv_engine-linux-master/kv_engine/engines/ep/tests/ep_testsuite.cc:1848 Test failed: `' (Expected `100', got `0' - Unexpected last_persisted_seqno)
|
(107 ms) CORE DUMPED
|
Actually, it seems to be a generic `KVBucket::flushVBucket()` issue caused by the order of execution of `stats.flusher_todo.store(0)` and `vb->setPersistenceSeqno(highSeqno)`:
stats.flusher_todo.store(0);
|
stats.totalPersistVBState++;
|
|
if (vb->rejectQueue.empty()) {
|
vb->setPersistedSnapshot(range.start, range.end);
|
uint64_t highSeqno = rwUnderlying->getLastPersistedSeqno(vbid);
|
if (highSeqno > 0 &&
|
highSeqno != vb->getPersistenceSeqno()) {
|
vb->setPersistenceSeqno(highSeqno);
|
}
|
}
|
The `stats.flusher_todo` variable is set to 0 before the 'last_persisted_seqno' is updated.