Skip to content

Add scripts to detect whether a cluster is affected by CA-528 or not#184

Open
m4nti5 wants to merge 2 commits into
mongodb:masterfrom
m4nti5:mgrillo/ca-528
Open

Add scripts to detect whether a cluster is affected by CA-528 or not#184
m4nti5 wants to merge 2 commits into
mongodb:masterfrom
m4nti5:mgrillo/ca-528

Conversation

@m4nti5
Copy link
Copy Markdown

@m4nti5 m4nti5 commented May 4, 2026

This PR adds two scripts:

find_candidate_collections.js Metadata scan — finds collections that could be affected
find_duplicates.js Aggregation — confirms whether duplicates actually exist

To 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.

@m4nti5 m4nti5 closed this May 4, 2026
@m4nti5 m4nti5 reopened this May 4, 2026
@m4nti5 m4nti5 marked this pull request as draft May 4, 2026 15:32
@m4nti5 m4nti5 marked this pull request as ready for review May 5, 2026 10:07
@m4nti5 m4nti5 marked this pull request as draft May 5, 2026 10:08
@jsmurphy jsmurphy requested a review from Copilot May 6, 2026 02:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.js to quickly scan sharded collections’ index/collection collation metadata.
  • Added find_duplicates.js to 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.

Comment thread ca-528/find_candidate_collections.js
Comment thread ca-528/find_duplicates.js
Comment thread ca-528/find_duplicates.js Outdated
Comment thread ca-528/find_duplicates.js
Comment thread ca-528/README.md Outdated
@m4nti5 m4nti5 requested a review from Copilot May 6, 2026 16:00
@m4nti5 m4nti5 marked this pull request as ready for review May 7, 2026 09:56
Copy link
Copy Markdown

@rafael-mdb rafael-mdb left a comment

Choose a reason for hiding this comment

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

No blocking issues. LGTM.
I tested against controlled Sharded cluster collation duplicate scenarios with multiple duplicate groups and verified correct detection and reporting.

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