summaryrefslogtreecommitdiff
path: root/jstests/core/timeseries/libs/timeseries.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/timeseries/libs/timeseries.js')
-rw-r--r--jstests/core/timeseries/libs/timeseries.js33
1 files changed, 4 insertions, 29 deletions
diff --git a/jstests/core/timeseries/libs/timeseries.js b/jstests/core/timeseries/libs/timeseries.js
index 540e0bcea55..ea8d71c87a1 100644
--- a/jstests/core/timeseries/libs/timeseries.js
+++ b/jstests/core/timeseries/libs/timeseries.js
@@ -11,20 +11,6 @@ var TimeseriesTest = class {
return FeatureFlagUtil.isEnabled(conn, "TimeseriesBucketCompression");
}
- static bucketsMayHaveMixedSchemaData(coll) {
- const catalog = coll.aggregate([{$listCatalog: {}}]).toArray()[0];
- const tsMixedSchemaOptionNewFormat = catalog.md.options.storageEngine &&
- catalog.md.options.storageEngine.wiredTiger &&
- catalog.md.options.storageEngine.wiredTiger.configString;
- // TODO SERVER-92533 Simplify once SERVER-91195 is backported to all supported branches
- if (tsMixedSchemaOptionNewFormat !== undefined) {
- return tsMixedSchemaOptionNewFormat ==
- "app_metadata=(timeseriesBucketsMayHaveMixedSchemaData=true)";
- } else {
- return catalog.md.timeseriesBucketsMayHaveMixedSchemaData;
- }
- }
-
/**
* Returns whether time-series updates and deletes are supported.
*/
@@ -66,16 +52,9 @@ var TimeseriesTest = class {
}
static bucketUnpackWithSortEnabled(conn) {
- const resp50 = conn.adminCommand({getParameter: 1, featureFlagBucketUnpackWithSort50: 1});
- const resp = conn.adminCommand({getParameter: 1, featureFlagBucketUnpackWithSort: 1});
- assert(Boolean(resp50.ok) ^ Boolean(resp.ok),
- `Expected exactly one of these feature flags to exist: ${tojson(resp50)} vs ${
- tojson(resp)}`);
- if (resp50.ok) {
- return assert.commandWorked(resp50).featureFlagBucketUnpackWithSort50.value;
- } else {
- return assert.commandWorked(resp).featureFlagBucketUnpackWithSort.value;
- }
+ return assert
+ .commandWorked(conn.adminCommand({getParameter: 1, featureFlagBucketUnpackWithSort: 1}))
+ .featureFlagBucketUnpackWithSort.value;
}
/**
@@ -220,7 +199,7 @@ var TimeseriesTest = class {
static ensureDataIsDistributedIfSharded(coll, splitPointDate) {
const db = coll.getDB();
- const buckets = db[this.getBucketsCollName(coll.getName())];
+ const buckets = db["system.buckets." + coll.getName()];
if (FixtureHelpers.isSharded(buckets)) {
const timeFieldName =
db.getCollectionInfos({name: coll.getName()})[0].options.timeseries.timeField;
@@ -269,8 +248,4 @@ var TimeseriesTest = class {
}
}
}
-
- static getBucketsCollName(collName) {
- return `system.buckets.${collName}`;
- }
};