diff options
-rw-r--r-- | src/mongo/db/timeseries/bucket_catalog.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/timeseries/bucket_catalog_test.cpp | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/mongo/db/timeseries/bucket_catalog.cpp b/src/mongo/db/timeseries/bucket_catalog.cpp index cef4bb3a964..9039f1cca62 100644 --- a/src/mongo/db/timeseries/bucket_catalog.cpp +++ b/src/mongo/db/timeseries/bucket_catalog.cpp @@ -1428,6 +1428,10 @@ StatusWith<std::unique_ptr<BucketCatalog::Bucket>> BucketCatalog::_rehydrateBuck std::make_unique<Bucket>(bucketId, stripeNumber, key.hash, &_bucketStateManager); const bool isCompressed = timeseries::isCompressedBucket(bucketDoc); + if (isCompressed) { + // TODO (SERVER-69907): Allow opening compressed bucket + return Status{ErrorCodes::BadValue, "Reopening uncompressed buckets is not supported yet"}; + } // Initialize the remaining member variables from the bucket document. bucket->setNamespace(ns); diff --git a/src/mongo/db/timeseries/bucket_catalog_test.cpp b/src/mongo/db/timeseries/bucket_catalog_test.cpp index 3cebd456710..ef3752a9707 100644 --- a/src/mongo/db/timeseries/bucket_catalog_test.cpp +++ b/src/mongo/db/timeseries/bucket_catalog_test.cpp @@ -1249,6 +1249,7 @@ TEST_F(BucketCatalogTest, ReopenUncompressedBucketAndInsertIncompatibleMeasureme _bucketCatalog->finish(batch, {}); } +/** TODO (SERVER-69907): Re-enable these tests TEST_F(BucketCatalogTest, ReopenCompressedBucketAndInsertCompatibleMeasurement) { RAIIServerParameterControllerForTest featureFlag{"featureFlagTimeseriesScalabilityImprovements", true}; @@ -1268,8 +1269,8 @@ TEST_F(BucketCatalogTest, ReopenCompressedBucketAndInsertCompatibleMeasurement) timeseries::compressBucket(bucketDoc, _timeField, _ns1, - /*eligibleForReopening=*/false, - /*validateDecompression=*/true); + eligibleForReopening=false, + validateDecompression=true); const BSONObj& compressedBucketDoc = compressionResult.compressedBucket.value(); RAIIServerParameterControllerForTest controller{"featureFlagTimeseriesScalabilityImprovements", @@ -1333,8 +1334,8 @@ TEST_F(BucketCatalogTest, ReopenCompressedBucketAndInsertIncompatibleMeasurement timeseries::compressBucket(bucketDoc, _timeField, _ns1, - /*eligibleForReopening=*/false, - /*validateDecompression=*/true); + eligibleForReopening=false, + validateDecompression=true); const BSONObj& compressedBucketDoc = compressionResult.compressedBucket.value(); RAIIServerParameterControllerForTest controller{"featureFlagTimeseriesScalabilityImprovements", @@ -1371,7 +1372,7 @@ TEST_F(BucketCatalogTest, ReopenCompressedBucketAndInsertIncompatibleMeasurement ASSERT_EQ(batch->numPreviouslyCommittedMeasurements(), 0); _bucketCatalog->finish(batch, {}); -} +}*/ TEST_F(BucketCatalogTest, ArchivingUnderMemoryPressure) { RAIIServerParameterControllerForTest featureFlag{"featureFlagTimeseriesScalabilityImprovements", |