Skip to content

Commit 326f424

Browse files
committed
MB-47604: Check secondary callbacks not made by primary for getRange
We should check for secondary callbacks not made by the primary in NexusKVStore::getRange. Change-Id: I78adbb3eca48f3505aeec1119eb0f6e5002725ec Reviewed-on: http://review.couchbase.org/c/kv_engine/+/163478 Tested-by: Build Bot <[email protected]> Reviewed-by: James H <[email protected]>
1 parent fec0b98 commit 326f424

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

engines/ep/src/kvstore/nexus-kvstore/nexus-kvstore.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,21 @@ void NexusKVStore::getRange(Vbid vb,
669669
primaryGetValues.pop_front();
670670
secondaryGetValues.pop_front();
671671
}
672+
673+
if (!secondaryGetValues.empty()) {
674+
std::stringstream ss;
675+
for (auto& gv : secondaryGetValues) {
676+
ss << *gv.item << ",";
677+
}
678+
ss.unget();
679+
680+
auto msg = fmt::format(
681+
"NexusKVStore::getRange: {}: secondary callbacks not made by "
682+
"primary:{}",
683+
vb,
684+
cb::UserData(ss.str()));
685+
handleError(msg);
686+
}
672687
}
673688

674689
void NexusKVStore::del(TransactionContext& txnCtx, queued_item item) {

0 commit comments

Comments
 (0)