diff --git a/replica/tablets.cc b/replica/tablets.cc index e2f4c2cbfd..33ba821b7a 100644 --- a/replica/tablets.cc +++ b/replica/tablets.cc @@ -213,6 +213,10 @@ future read_tablet_metadata(cql3::query_processor& qp) { for (auto&& r : tablet_replicas) { pending.erase(r); } + if (pending.size() == 0) { + throw std::runtime_error(format("Stage set but no pending replica for table {} tablet {}", + table, current->tid)); + } if (pending.size() > 1) { throw std::runtime_error(format("Too many pending replicas for table {} tablet {}: {}", table, current->tid, pending));