diff options
author | Faustoleyva54 <fausto.leyva@mongodb.com> | 2023-01-27 15:24:18 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-27 16:00:39 +0000 |
commit | ffd636b1f009b826725f8c30ed8834e285f6d0e3 (patch) | |
tree | f47f92e33ce9ddfcf8e86b93678b0a372c087d15 /src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp | |
parent | a54ab549bb0160c73dfd56f8f64365789409b504 (diff) | |
download | mongo-ffd636b1f009b826725f8c30ed8834e285f6d0e3.tar.gz |
SERVER-73193 Do not proactively set control.closed flag when closing a time-series bucket
Diffstat (limited to 'src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp')
-rw-r--r-- | src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp b/src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp index e371f5ba2d6..35c2cc7f5e4 100644 --- a/src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp +++ b/src/mongo/db/timeseries/bucket_catalog/bucket_catalog_test.cpp @@ -1369,7 +1369,6 @@ TEST_F(BucketCatalogTest, ReopenCompressedBucketAndInsertCompatibleMeasurement) CompressionResult compressionResult = compressBucket(bucketDoc, _timeField, _ns1, - /*eligibleForReopening*/ true, /*validateDecompression*/ true); const BSONObj& compressedBucketDoc = compressionResult.compressedBucket.value(); @@ -1431,7 +1430,6 @@ TEST_F(BucketCatalogTest, ReopenCompressedBucketAndInsertIncompatibleMeasurement CompressionResult compressionResult = compressBucket(bucketDoc, _timeField, _ns1, - /*eligibleForReopening*/ true, /*validateDecompression*/ true); const BSONObj& compressedBucketDoc = compressionResult.compressedBucket.value(); @@ -1563,7 +1561,7 @@ TEST_F(BucketCatalogTest, TryInsertWillNotCreateBucketWhenWeShouldTryToReopen) { ASSERT_OK(result.getStatus()); ASSERT(result.getValue().closedBuckets.empty()); ASSERT(!result.getValue().batch); - ASSERT_TRUE(stdx::holds_alternative<BSONObj>(result.getValue().candidate)); + ASSERT_TRUE(stdx::holds_alternative<std::vector<BSONObj>>(result.getValue().candidate)); // Actually insert so we do have an open bucket to test against. result = _bucketCatalog->insert( @@ -1593,7 +1591,7 @@ TEST_F(BucketCatalogTest, TryInsertWillNotCreateBucketWhenWeShouldTryToReopen) { ASSERT_OK(result.getStatus()); ASSERT(result.getValue().closedBuckets.empty()); ASSERT(!result.getValue().batch); - ASSERT_TRUE(stdx::holds_alternative<BSONObj>(result.getValue().candidate)); + ASSERT_TRUE(stdx::holds_alternative<std::vector<BSONObj>>(result.getValue().candidate)); // Time forward should not hint to re-open. result = _bucketCatalog->tryInsert( @@ -1742,7 +1740,6 @@ TEST_F(BucketCatalogTest, InsertIntoReopenedBucket) { ASSERT_EQ(1, _getExecutionStat(_ns1, kNumClosedDueToReopening)); ASSERT_EQ(1, _getExecutionStat(_ns1, kNumBucketsReopened)); ASSERT_FALSE(result.getValue().closedBuckets.empty()); - ASSERT_TRUE(result.getValue().closedBuckets[0].eligibleForReopening); // Verify that if we try another insert for the soft-closed bucket, we get a query-based // reopening candidate. @@ -1756,7 +1753,7 @@ TEST_F(BucketCatalogTest, InsertIntoReopenedBucket) { ASSERT_OK(result.getStatus()); ASSERT_TRUE(result.getValue().closedBuckets.empty()); ASSERT(!result.getValue().batch); - ASSERT_TRUE(stdx::holds_alternative<BSONObj>(result.getValue().candidate)); + ASSERT_TRUE(stdx::holds_alternative<std::vector<BSONObj>>(result.getValue().candidate)); } TEST_F(BucketCatalogTest, CannotInsertIntoOutdatedBucket) { |