Skip to content

Conversation

@jgao54
Copy link
Contributor

@jgao54 jgao54 commented Aug 14, 2025

Change Streams API is documented to work out-of-the-box for sharded cluster. This PR updates the shared validation code to:

  • check to make sure that the instance is either replica set or sharded cluster (previously, it ran replSetGetStatus to check this, we can instead use 'hello' command which is more general)
  • add explicit validation for required roles (readAnyDatabase, clusterMonitor)
  • better separation of concern by creating a commands.go file for all the db commands, while validation.go implements the validation logic -- will follow up with ClickPipes side as well.

Testing:

  • tested replica set on Atlas
  • test replica set on EC2
  • test sharded cluster on Atlas
  • test sharded clsuter on EC2

@jgao54 jgao54 changed the title enable ShardedCluster + better code sharing for validation mongo: enable ShardedCluster + better code sharing for validation Aug 14, 2025
@jgao54 jgao54 force-pushed the shardedcluster branch 7 times, most recently from 1129482 to 2dd8aec Compare August 15, 2025 00:10
@jgao54 jgao54 marked this pull request as ready for review August 15, 2025 02:56
@jgao54 jgao54 requested review from ilidemi and serprex August 15, 2025 05:50
@jgao54 jgao54 enabled auto-merge (squash) August 15, 2025 18:52
@jgao54 jgao54 requested review from serprex August 15, 2025 18:52
@jgao54 jgao54 merged commit 75c670e into main Aug 15, 2025
13 of 14 checks passed
@jgao54 jgao54 deleted the shardedcluster branch August 15, 2025 21: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.

2 participants