Add scripts to detect whether a cluster is affected by CA-528 or not#184
Open
m4nti5 wants to merge 2 commits into
Open
Add scripts to detect whether a cluster is affected by CA-528 or not#184m4nti5 wants to merge 2 commits into
m4nti5 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a two-step diagnostic workflow under ca-528/ to help support/field teams determine whether a sharded MongoDB cluster is affected by SERVER-85346 (CA-528), by first identifying candidate collections via metadata and then running an aggregation-based confirmation step.
Changes:
- Added a README-based “Detection Guide” describing the two-step process and expected outputs.
- Added
find_candidate_collections.jsto quickly scan sharded collections’ index/collection collation metadata. - Added
find_duplicates.jsto run an aggregation over candidate collections to report potential duplicate groups.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| ca-528/README.md | Adds end-to-end operator documentation for running Step 1/Step 2 and interpreting results. |
| ca-528/find_candidate_collections.js | Introduces a fast metadata scan to list collections/indexes that may require deeper checking. |
| ca-528/find_duplicates.js | Introduces an aggregation-based scan intended to confirm duplicate groups for candidate indexes/collections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rafael-mdb
approved these changes
May 7, 2026
rafael-mdb
left a comment
There was a problem hiding this comment.
No blocking issues. LGTM.
I tested against controlled Sharded cluster collation duplicate scenarios with multiple duplicate groups and verified correct detection and reporting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds two scripts:
find_candidate_collections.jsMetadata scan — finds collections that could be affectedfind_duplicates.jsAggregation — confirms whether duplicates actually existTo detect wheter you might or are affected by CA-528. The main reason it's two script is because the second script does a collection scan with an aggregation, so, the idea is that a customer that is not sure it might be affected can run the first script to check for the metadata of all the collections and find whether the cluster might be affected or not.