Skip to content

Commit 6c11d50

Browse files
jimwwalkerdaverigby
authored andcommitted
Revert "MB-39946: Catch underflow exception and dump flusher state"
This reverts commit 0ee4146. This commit was only added for gathering detailed flusher state when the bug occurs and is not needed once MB-39946 is resolved. Change-Id: Ib98d619d2b836fafd4d2cdd66c89d3f86abb954a Reviewed-on: http://review.couchbase.org/c/kv_engine/+/140212 Tested-by: Build Bot <[email protected]> Reviewed-by: Trond Norbye <[email protected]>
1 parent 0428ccd commit 6c11d50

File tree

2 files changed

+10
-50
lines changed

2 files changed

+10
-50
lines changed

engines/ep/src/collections/flush.cc

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,10 @@ void Flush::saveCollectionStats(
105105

106106
// Generate new stats, add the deltas from this flush batch for count
107107
// and size and set the high-seqno
108-
try {
109-
PersistedStats ps(stats.itemCount + flushStats.getItemCount(),
110-
flushStats.getPersistedHighSeqno(),
111-
stats.diskSize + flushStats.getDiskSize());
112-
cb(cid, ps);
113-
} catch (const std::exception& e) {
114-
EP_LOG_CRITICAL("Flush::saveCollectionStats caught exception {}",
115-
e.what());
116-
EP_LOG_CRITICAL(
117-
"Flush::saveCollectionStats items:{} + {}, highSeq:{}, "
118-
"diskSize:{} + {}",
119-
stats.itemCount,
120-
flushStats.getItemCount(),
121-
flushStats.getPersistedHighSeqno(),
122-
stats.diskSize,
123-
flushStats.getDiskSize());
124-
throw;
125-
}
108+
PersistedStats ps(stats.itemCount + flushStats.getItemCount(),
109+
flushStats.getPersistedHighSeqno(),
110+
stats.diskSize + flushStats.getDiskSize());
111+
cb(cid, ps);
126112
}
127113
}
128114

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

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,38 +2769,12 @@ couchstore_error_t CouchKVStore::saveDocs(Vbid vbid,
27692769
state.updateOnDiskPrepareBytes(kvctx.onDiskPrepareBytesDelta);
27702770
pendingLocalReqsQ.emplace_back("_local/vbstate", makeJsonVBState(state));
27712771

2772-
try {
2773-
kvctx.commitData.collections.saveCollectionStats(
2774-
std::bind(&CouchKVStore::saveCollectionStats,
2775-
this,
2776-
std::ref(*db),
2777-
std::placeholders::_1,
2778-
std::placeholders::_2));
2779-
2780-
} catch (const std::exception& e) {
2781-
// Dump the flush batch
2782-
logger.critical(
2783-
"CouchKVStore::saveDocs {} saveCollectionStats exception {} "
2784-
"docs:{}",
2785-
vbid,
2786-
e.what(),
2787-
docs.size());
2788-
2789-
for (size_t ii = 0; ii < docs.size(); ii++) {
2790-
auto key = makeDiskDocKey(docinfos[ii]->id);
2791-
logger.critical(
2792-
"CouchKVStore::saveDocs info key:{}, seq:{}, rev:{}, "
2793-
"deleted:{}, cm:{}, value_size:{}",
2794-
key.to_string(),
2795-
docinfos[ii]->db_seq,
2796-
docinfos[ii]->rev_seq,
2797-
docinfos[ii]->deleted,
2798-
int(docinfos[ii]->content_meta),
2799-
docs[ii] ? docs[ii]->data.size : 0);
2800-
}
2801-
2802-
throw;
2803-
}
2772+
kvctx.commitData.collections.saveCollectionStats(
2773+
std::bind(&CouchKVStore::saveCollectionStats,
2774+
this,
2775+
std::ref(*db),
2776+
std::placeholders::_1,
2777+
std::placeholders::_2));
28042778

28052779
if (kvctx.commitData.collections.isReadyForCommit()) {
28062780
updateCollectionsMeta(*db, kvctx.commitData.collections);

0 commit comments

Comments
 (0)