diff options
author | Billy Donahue <BillyDonahue@users.noreply.github.com> | 2022-07-27 18:17:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-27 19:38:08 +0000 |
commit | 958ad9abfc80861d3f43f44da694e83464b01e1d (patch) | |
tree | ca14e7097c1cb8ab20dfad7fa6888511f0226650 /src/mongo/db/stats | |
parent | f8a1ac19be6279e7ace012dafa8cfcaa028d49e1 (diff) | |
download | mongo-958ad9abfc80861d3f43f44da694e83464b01e1d.tar.gz |
SERVER-68246 rewrite calls to boost::optional get and is_initialized
Diffstat (limited to 'src/mongo/db/stats')
-rw-r--r-- | src/mongo/db/stats/single_transaction_stats.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/stats/storage_stats.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/stats/single_transaction_stats.cpp b/src/mongo/db/stats/single_transaction_stats.cpp index 3234998fb28..18f2d9965ac 100644 --- a/src/mongo/db/stats/single_transaction_stats.cpp +++ b/src/mongo/db/stats/single_transaction_stats.cpp @@ -57,11 +57,11 @@ Microseconds SingleTransactionStats::getPreparedDuration(TickSource* tickSource, if (_preparedStartTime != boost::none) { // If the transaction hasn't ended yet, we return how long it has currently been running // for. - invariant(_preparedStartTime.get() > 0); + invariant(_preparedStartTime.value() > 0); if (_endTime == 0) { - return tickSource->ticksTo<Microseconds>(curTick - _preparedStartTime.get()); + return tickSource->ticksTo<Microseconds>(curTick - _preparedStartTime.value()); } - return tickSource->ticksTo<Microseconds>(_endTime - _preparedStartTime.get()); + return tickSource->ticksTo<Microseconds>(_endTime - _preparedStartTime.value()); } return Microseconds(0); } diff --git a/src/mongo/db/stats/storage_stats.cpp b/src/mongo/db/stats/storage_stats.cpp index b128bb7958f..2be6bd5af8f 100644 --- a/src/mongo/db/stats/storage_stats.cpp +++ b/src/mongo/db/stats/storage_stats.cpp @@ -163,7 +163,7 @@ Status appendCollectionStorageStats(OperationContext* opCtx, collation = collator->getSpec().toBSON(); } auto clusteredSpec = clustered_util::formatClusterKeyForListIndexes( - collection->getClusteredInfo().get(), collation); + collection->getClusteredInfo().value(), collation); auto indexSpec = collection->getClusteredInfo()->getIndexSpec(); auto nameOptional = indexSpec.getName(); // An index name is always expected. |