Skip to content

Commit 3d63468

Browse files
jimwwalkerdaverigby
authored andcommitted
MB-35331: Increment flusher_todo for set_vbucket_state
Ensure wait_for_flusher_to_settle waits for a set_vbucket_state by increasing the flusher_todo, which will be cleared once the flusher has committed its batch. Commit also includes further debug for warmup_mb21769 test as that still fails, even with the flusher_todo increment Change-Id: Ib78ecc0f02da95a6aee3c9031bf445c7a11d365a Reviewed-on: http://review.couchbase.org/113616 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent 5191f1c commit 3d63468

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

engines/ep/src/ep_bucket.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,10 @@ std::pair<bool, size_t> EPBucket::flushVBucket(Vbid vbid) {
466466
// no 'real' items in the checkpoint.
467467
mustCheckpointVBState = true;
468468

469-
// Update queuing stats how this item has logically been
469+
// There is at least a commit to be done, so increase todo
470+
++stats.flusher_todo;
471+
472+
// Update queuing stats now this item has logically been
470473
// processed.
471474
--stats.diskQueueSize;
472475
vb->doStatsForFlushing(*item, item->size());

engines/ep/tests/ep_testsuite_basic.cc

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,11 +1870,23 @@ static enum test_result warmup_mb21769(EngineIface* h) {
18701870
get_ull_stat(h, snap_end.c_str(), vb_group_key.c_str()),
18711871
std::string("snap_end incorrect vb:" + std::to_string(vb))
18721872
.c_str());
1873-
checkeq(failover_entry0[vb],
1874-
get_ull_stat(h, fail0.c_str(), failovers_key.c_str()),
1875-
std::string("failover table entry 0 is incorrect vb:" +
1876-
std::to_string(vb))
1877-
.c_str());
1873+
auto failoverTable = get_all_stats(h, failovers_key.c_str());
1874+
if (failoverTable[fail0] != std::to_string(failover_entry0[vb])) {
1875+
std::cerr << "failover table entry 0 is incorrect for vb:" << vb
1876+
<< " expected:" << failover_entry0[vb]
1877+
<< " got:" << failoverTable[fail0]
1878+
<< " dumping failover table\n";
1879+
for (const auto& stat : failoverTable) {
1880+
std::cerr << stat.first << ":" << stat.second << std::endl;
1881+
}
1882+
std::string detail = "vbucket-details " + std::to_string(vb);
1883+
auto details = get_all_stats(h, detail.c_str());
1884+
std::cerr << detail << std::endl;
1885+
for (const auto& stat : details) {
1886+
std::cerr << stat.first << ":" << stat.second << std::endl;
1887+
}
1888+
return FAIL;
1889+
}
18781890
}
18791891

18801892
return SUCCESS;

0 commit comments

Comments
 (0)