summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/mobile/mobile_record_store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/mobile/mobile_record_store.cpp')
-rw-r--r--src/mongo/db/storage/mobile/mobile_record_store.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/storage/mobile/mobile_record_store.cpp b/src/mongo/db/storage/mobile/mobile_record_store.cpp
index 7543fcb1617..f60142d95fe 100644
--- a/src/mongo/db/storage/mobile/mobile_record_store.cpp
+++ b/src/mongo/db/storage/mobile/mobile_record_store.cpp
@@ -233,7 +233,7 @@ void MobileRecordStore::_initDataSizeIfNeeded_inlock(OperationContext* opCtx) co
}
long long MobileRecordStore::dataSize(OperationContext* opCtx) const {
- stdx::lock_guard<stdx::mutex> lock(_dataSizeMutex);
+ stdx::lock_guard<Latch> lock(_dataSizeMutex);
_initDataSizeIfNeeded_inlock(opCtx);
return _dataSize;
}
@@ -255,7 +255,7 @@ void MobileRecordStore::_initNumRecsIfNeeded_inlock(OperationContext* opCtx) con
}
long long MobileRecordStore::numRecords(OperationContext* opCtx) const {
- stdx::lock_guard<stdx::mutex> lock(_numRecsMutex);
+ stdx::lock_guard<Latch> lock(_numRecsMutex);
_initNumRecsIfNeeded_inlock(opCtx);
return _numRecs;
}
@@ -420,7 +420,7 @@ public:
void commit(boost::optional<Timestamp>) override {}
void rollback() override {
- stdx::lock_guard<stdx::mutex> lock(_rs->_numRecsMutex);
+ stdx::lock_guard<Latch> lock(_rs->_numRecsMutex);
_rs->_numRecs -= _diff;
}
@@ -430,7 +430,7 @@ private:
};
void MobileRecordStore::_changeNumRecs(OperationContext* opCtx, int64_t diff) {
- stdx::lock_guard<stdx::mutex> lock(_numRecsMutex);
+ stdx::lock_guard<Latch> lock(_numRecsMutex);
opCtx->recoveryUnit()->registerChange(std::make_unique<NumRecsChange>(this, diff));
_initNumRecsIfNeeded_inlock(opCtx);
_numRecs += diff;
@@ -441,7 +441,7 @@ bool MobileRecordStore::_resetNumRecsIfNeeded(OperationContext* opCtx, int64_t n
int64_t currNumRecs = numRecords(opCtx);
if (currNumRecs != newNumRecs) {
wasReset = true;
- stdx::lock_guard<stdx::mutex> lock(_numRecsMutex);
+ stdx::lock_guard<Latch> lock(_numRecsMutex);
_numRecs = newNumRecs;
}
return wasReset;
@@ -457,7 +457,7 @@ public:
void commit(boost::optional<Timestamp>) override {}
void rollback() override {
- stdx::lock_guard<stdx::mutex> lock(_rs->_dataSizeMutex);
+ stdx::lock_guard<Latch> lock(_rs->_dataSizeMutex);
_rs->_dataSize -= _diff;
}
@@ -467,7 +467,7 @@ private:
};
void MobileRecordStore::_changeDataSize(OperationContext* opCtx, int64_t diff) {
- stdx::lock_guard<stdx::mutex> lock(_dataSizeMutex);
+ stdx::lock_guard<Latch> lock(_dataSizeMutex);
opCtx->recoveryUnit()->registerChange(std::make_unique<DataSizeChange>(this, diff));
_initDataSizeIfNeeded_inlock(opCtx);
_dataSize += diff;
@@ -479,7 +479,7 @@ bool MobileRecordStore::_resetDataSizeIfNeeded(OperationContext* opCtx, int64_t
if (currDataSize != _dataSize) {
wasReset = true;
- stdx::lock_guard<stdx::mutex> lock(_dataSizeMutex);
+ stdx::lock_guard<Latch> lock(_dataSizeMutex);
_dataSize = newDataSize;
}
return wasReset;