Skip to content

test(shell-api): timeseries namespace change in 9.0 MONGOSH-3451 - #2765

Closed
nbbeeken wants to merge 1 commit into
mainfrom
fixes
Closed

test(shell-api): timeseries namespace change in 9.0 MONGOSH-3451#2765
nbbeeken wants to merge 1 commit into
mainfrom
fixes

Conversation

@nbbeeken

@nbbeeken nbbeeken commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

MONGOSH-3451 — linux-mlatest
MONGOSH-3473 — win32-mlatest
MONGOSH-3422 — darwin-mlatest

@nbbeeken
nbbeeken requested a review from a team as a code owner July 8, 2026 21:55
@nbbeeken
nbbeeken requested review from alenakhineika and Copilot July 8, 2026 21:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the sharded time series collection.stats() integration test to account for MongoDB 9.0’s change where time series collections become “viewless”, affecting the reported timeseries.bucketsNs namespace.

Changes:

  • Add a server-version-based switch to determine whether timeseries.bucketsNs should be system.buckets.<coll> or the collection namespace itself.
  • Adjust assertions in the sharded time series collection.stats() test to use the expected namespace.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3419 to +3425
const expectedBucketsNs = isTimeseriesViewless
? `${dbName}.${timeseriesCollectionName}`
: `${dbName}.system.buckets.${timeseriesCollectionName}`;
for (const shard of Object.values(result.shards) as any) {
expect(shard.totalSize).to.be.a('number');
expect(shard.indexDetails).to.equal(undefined);
expect(shard.timeseries.bucketsNs).to.equal(
`${dbName}.system.buckets.${timeseriesCollectionName}`
);
expect(shard.timeseries.bucketsNs).to.equal(expectedBucketsNs);
expect(result.timeseries.bucketsNs).to.equal(
`${dbName}.system.buckets.${timeseriesCollectionName}`
);
expect(result.timeseries.bucketsNs).to.equal(expectedBucketsNs);
Comment on lines +3219 to +3222
// Server 9.0 makes timeseries collections viewless: there is no separate
// system.buckets.<coll> namespace anymore, so bucketsNs is the collection
// namespace itself.
let isTimeseriesViewless: boolean;
Comment on lines +3233 to +3234
isTimeseriesViewless =
Number.parseInt(dbVersion.split('.')[0], 10) >= 9;
@nbbeeken

nbbeeken commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

better solution: #2767

@nbbeeken nbbeeken closed this Jul 9, 2026
@nbbeeken
nbbeeken deleted the fixes branch July 9, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants