summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-11-09 14:25:07 +0100
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-11-09 14:36:28 +0100
commit82dcbf55d9dc2f5f9ca9033f40f6f8d5c01c1f45 (patch)
tree7945fbd38206e88041111818b03292d24e47193c
parent62967d9f0c164b77b15d113e0b7e84489660b401 (diff)
downloadmongo-82dcbf55d9dc2f5f9ca9033f40f6f8d5c01c1f45.tar.gz
SERVER-37867 Include the record id and the store which failed to find a record
-rw-r--r--src/mongo/db/s/collection_range_deleter.cpp1
-rw-r--r--src/mongo/db/storage/record_store.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/s/collection_range_deleter.cpp b/src/mongo/db/s/collection_range_deleter.cpp
index 408d5afafee..c92986382a2 100644
--- a/src/mongo/db/s/collection_range_deleter.cpp
+++ b/src/mongo/db/s/collection_range_deleter.cpp
@@ -374,6 +374,7 @@ StatusWith<int> CollectionRangeDeleter::_doDeletion(OperationContext* opCtx,
invariant(PlanExecutor::ADVANCED == state);
exec->saveState();
+
writeConflictRetry(opCtx, "delete range", nss.ns(), [&] {
WriteUnitOfWork wuow(opCtx);
if (saver) {
diff --git a/src/mongo/db/storage/record_store.h b/src/mongo/db/storage/record_store.h
index ecee15a07c7..a6dc2901ff1 100644
--- a/src/mongo/db/storage/record_store.h
+++ b/src/mongo/db/storage/record_store.h
@@ -311,7 +311,8 @@ public:
*/
RecordData dataFor(OperationContext* opCtx, const RecordId& loc) const {
RecordData data;
- invariant(findRecord(opCtx, loc, &data));
+ invariant(findRecord(opCtx, loc, &data),
+ str::stream() << "Didn't find RecordId " << loc << " in record store " << ns());
return data;
}