Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

nirinchev
Copy link
Collaborator

Adds the collection.getShardLocation helper that returns { shards: string[], sharded: boolean } as a response. Under the hood calls

db.aggregate([$listClusterCatalog: {
    shards: true,
}]);

and filters the result to extract the information about the current collection.

@nirinchev nirinchev requested review from addaleax and gagik June 10, 2025 11:51
packages/shell-api/src/collection.ts Outdated Show resolved Hide resolved
@addaleax addaleax changed the title feat: add collection.getShardLocation helper method MONGOSH-1996 feat(shell-api): add collection.getShardLocation helper method MONGOSH-1996 Jun 10, 2025
@nirinchev nirinchev merged commit f852f52 into main Jun 12, 2025
130 of 134 checks passed
@nirinchev nirinchev deleted the ni/get-shard-location branch June 12, 2025 13:32
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.