diff options
author | Bynn Lee <bynn.lee@mongodb.com> | 2021-02-17 22:34:59 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-22 17:28:27 +0000 |
commit | 3307ba57eef2dfff9abe2413e39058ac9451ec04 (patch) | |
tree | 57a7b6a482e927176823a39a671ac9fdd832d062 /src/mongo/db/storage | |
parent | bfbf776563bf16a6a52ffcc0a69f4686953eb0a1 (diff) | |
download | mongo-3307ba57eef2dfff9abe2413e39058ac9451ec04.tar.gz |
SERVER-43762 tighten the overload set for BSONObjBuilder::appendNumber
Diffstat (limited to 'src/mongo/db/storage')
4 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp b/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp index fbe23c1fdc9..fef0b5cb35a 100644 --- a/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp +++ b/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp @@ -548,8 +548,8 @@ void EphemeralForTestRecordStore::appendCustomStats(OperationContext* opCtx, double scale) const { result->appendBool("capped", _isCapped); if (_isCapped) { - result->appendIntOrLL("max", _cappedMaxDocs); - result->appendIntOrLL("maxSize", _cappedMaxSize / scale); + result->appendNumber("max", static_cast<long long>(_cappedMaxDocs)); + result->appendNumber("maxSize", _cappedMaxSize / scale); } } diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp index 5783ccaf470..b5148c8aff4 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp @@ -289,8 +289,8 @@ void RecordStore::appendCustomStats(OperationContext* opCtx, double scale) const { result->appendBool("capped", _isCapped); if (_isCapped) { - result->appendIntOrLL("max", _cappedMaxDocs); - result->appendIntOrLL("maxSize", _cappedMaxSize / scale); + result->appendNumber("max", static_cast<long long>(_cappedMaxDocs)); + result->appendNumber("maxSize", _cappedMaxSize / scale); } } diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index 9515af2fe1e..001d26dab60 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -1946,10 +1946,10 @@ void WiredTigerRecordStore::appendCustomStats(OperationContext* opCtx, double scale) const { result->appendBool("capped", _isCapped); if (_isCapped) { - result->appendIntOrLL("max", _cappedMaxDocs); - result->appendIntOrLL("maxSize", static_cast<long long>(_cappedMaxSize / scale)); - result->appendIntOrLL("sleepCount", _cappedSleep.load()); - result->appendIntOrLL("sleepMS", _cappedSleepMS.load()); + result->appendNumber("max", static_cast<long long>(_cappedMaxDocs)); + result->appendNumber("maxSize", static_cast<long long>(_cappedMaxSize / scale)); + result->appendNumber("sleepCount", _cappedSleep.load()); + result->appendNumber("sleepMS", _cappedSleepMS.load()); } WiredTigerSession* session = WiredTigerRecoveryUnit::get(opCtx)->getSessionNoTxn(); WT_SESSION* s = session->getSession(); diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp index c5c1ced6c79..2d0b7998e5d 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp @@ -303,7 +303,7 @@ Status WiredTigerUtil::getApplicationMetadata(OperationContext* opCtx, bob->appendBool(key, valueItem.val); break; case WT_CONFIG_ITEM::WT_CONFIG_ITEM_NUM: - bob->appendIntOrLL(key, valueItem.val); + bob->appendNumber(key, static_cast<long long>(valueItem.val)); break; default: bob->append(key, StringData(valueItem.str, valueItem.len)); |