diff options
author | Benety Goh <benety@mongodb.com> | 2018-12-11 21:29:15 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2018-12-11 21:29:28 -0500 |
commit | c0b48bee20c8383f08902d2bd338010e95312fa6 (patch) | |
tree | 952acd05af9e0b7facee8679d433a3d171a82551 /src/mongo/db/storage/kv | |
parent | 31439682d76a900c26d5eeed4d0db00416b89f13 (diff) | |
download | mongo-c0b48bee20c8383f08902d2bd338010e95312fa6.tar.gz |
SERVER-38449 convert invariant in TemporaryKVRecordStore to fassert
Diffstat (limited to 'src/mongo/db/storage/kv')
-rw-r--r-- | src/mongo/db/storage/kv/temporary_kv_record_store.cpp | 14 | ||||
-rw-r--r-- | src/mongo/db/storage/kv/temporary_kv_record_store.h | 8 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/mongo/db/storage/kv/temporary_kv_record_store.cpp b/src/mongo/db/storage/kv/temporary_kv_record_store.cpp index 3f2a9d47fb7..dffcb864268 100644 --- a/src/mongo/db/storage/kv/temporary_kv_record_store.cpp +++ b/src/mongo/db/storage/kv/temporary_kv_record_store.cpp @@ -29,17 +29,21 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage +#include "mongo/platform/basic.h" + #include "mongo/db/storage/kv/temporary_kv_record_store.h" -#include "mongo/util/log.h" + +#include "mongo/db/storage/kv/kv_engine.h" +#include "mongo/util/assert_util.h" +#include "mongo/util/mongoutils/str.h" namespace mongo { TemporaryKVRecordStore::~TemporaryKVRecordStore() { auto status = _kvEngine->dropIdent(_opCtx, _rs->getIdent()); - invariant(status.isOK(), - str::stream() << "failed to drop temporary ident: " << _rs->getIdent() - << " with status: " - << status); + fassert( + 51032, + status.withContext(str::stream() << "failed to drop temporary ident: " << _rs->getIdent())); } } // namespace mongo diff --git a/src/mongo/db/storage/kv/temporary_kv_record_store.h b/src/mongo/db/storage/kv/temporary_kv_record_store.h index 544e4c15a31..c9b7a6945ad 100644 --- a/src/mongo/db/storage/kv/temporary_kv_record_store.h +++ b/src/mongo/db/storage/kv/temporary_kv_record_store.h @@ -29,14 +29,14 @@ #pragma once -#include "mongo/db/storage/temporary_record_store.h" - -#include "mongo/db/operation_context.h" -#include "mongo/db/storage/kv/kv_engine.h" #include "mongo/db/storage/record_store.h" +#include "mongo/db/storage/temporary_record_store.h" namespace mongo { +class KVEngine; +class OperationContext; + /** * This is an implementation of an RAII type that manages a temporary RecordStore on a KVEngine. * |