}
DcpResponse* ActiveStream::deadPhase() {
- return nextQueuedItem();
+ DcpResponse* resp = nextQueuedItem();
+ if (!resp) {
+ LOG(EXTENSION_LOG_WARNING,
+ "(vb %" PRIu16 ") Stream closed, "
+ "%" PRIu64 " items sent from backfill phase, "
+ "%" PRIu64 " items sent from memory phase, "
+ "%" PRIu64 " was last seqno sent",
+ vb_,
- uint64_t(itemsFromBackfill),
- uint64_t(itemsFromMemory),
++ uint64_t(backfillItems.sent.load()),
++ uint64_t(itemsFromMemoryPhase),
+ lastSentSeqno.load());
+ }
+ return resp;
}
void ActiveStream::addStats(ADD_STAT add_stat, const void *c) {