summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wang <david.wang@mongodb.com>2022-07-15 20:06:31 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-15 21:07:03 +0000
commite5b531d247980a6fb1fb11992e2fb7c2b11f59c2 (patch)
tree98b031fc9ffb773fa6e7775c69a07a9836e4d9a1
parent015702b68366bf505f2f19bcaf89ff764ce51459 (diff)
downloadmongo-e5b531d247980a6fb1fb11992e2fb7c2b11f59c2.tar.gz
SERVER-68052 Ensure BucketCatalog mutex outlives its uses
-rw-r--r--src/mongo/db/timeseries/bucket_catalog.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/timeseries/bucket_catalog.h b/src/mongo/db/timeseries/bucket_catalog.h
index 7f746ce3653..77cfee2713f 100644
--- a/src/mongo/db/timeseries/bucket_catalog.h
+++ b/src/mongo/db/timeseries/bucket_catalog.h
@@ -969,14 +969,14 @@ protected:
static long long _marginalMemoryUsageForArchivedBucket(const ArchivedBucket& bucket,
bool onlyEntryForMatchingMetaHash);
+ mutable Mutex _mutex =
+ MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(0), "BucketCatalog::_mutex");
+
EraManager _eraManager = {&_mutex};
static constexpr std::size_t kNumberOfStripes = 32;
std::array<Stripe, kNumberOfStripes> _stripes;
- mutable Mutex _mutex =
- MONGO_MAKE_LATCH(HierarchicalAcquisitionLevel(0), "BucketCatalog::_mutex");
-
// Bucket state for synchronization with direct writes, protected by '_mutex'
stdx::unordered_map<OID, BucketState, OID::Hasher> _bucketStates;