diff options
author | Gregory Noma <gregory.noma@gmail.com> | 2023-02-09 15:11:09 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-09 20:42:53 +0000 |
commit | ac38b8ebe46bdd3ca3010c09956c8099424c6c1a (patch) | |
tree | f1efbf55bb70103bee9fe433ac24b1d83c03eb2a /src/mongo/db | |
parent | 1049af0cf89571f65cf9a22dfe75119b9059d785 (diff) | |
download | mongo-ac38b8ebe46bdd3ca3010c09956c8099424c6c1a.tar.gz |
SERVER-72063 Throw on attempt to create overly small oplog
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index 5850e4c4077..a82cb7f25e5 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -221,7 +221,9 @@ WiredTigerRecordStore::OplogStones::OplogStones(OperationContext* opCtx, WiredTi unsigned long long numStones = maxSize / oplogStoneSize; size_t numStonesToKeep = std::min(kMaxStonesToKeep, std::max(kMinStonesToKeep, numStones)); _minBytesPerStone = maxSize / numStonesToKeep; - invariant(_minBytesPerStone > 0); + uassert(7206300, + fmt::format("Cannot create oplog of size less than {} bytes", numStonesToKeep), + _minBytesPerStone > 0); _calculateStones(opCtx, numStonesToKeep); _pokeReclaimThreadIfNeeded(); // Reclaim stones if over the limit. |