diff options
author | David Wang <david.wang@mongodb.com> | 2022-07-15 20:06:31 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-15 21:07:03 +0000 |
commit | e5b531d247980a6fb1fb11992e2fb7c2b11f59c2 (patch) | |
tree | 98b031fc9ffb773fa6e7775c69a07a9836e4d9a1 /src/mongo/db/timeseries | |
parent | 015702b68366bf505f2f19bcaf89ff764ce51459 (diff) | |
download | mongo-e5b531d247980a6fb1fb11992e2fb7c2b11f59c2.tar.gz |
SERVER-68052 Ensure BucketCatalog mutex outlives its uses
Diffstat (limited to 'src/mongo/db/timeseries')
-rw-r--r-- | src/mongo/db/timeseries/bucket_catalog.h | 6 |
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; |