Skip to content

mongoDB parallel snapshot follow-up#4531

Merged
jgao54 merged 2 commits into
mainfrom
mongo-id-partitioning-fixes
Jul 7, 2026
Merged

mongoDB parallel snapshot follow-up#4531
jgao54 merged 2 commits into
mainfrom
mongo-id-partitioning-fixes

Conversation

@jgao54

@jgao54 jgao54 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Follow-ups for MongoDB parallel snapshotting #4487 to introduce NumericPartitions; this avoids missing data during initial snapshots when there are interior fractional _ids.

A few other smaller clean-up, with inline comments.

Comment on lines -190 to -191
slog.String("minID", minVal),
slog.String("maxID", maxVal),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

make sure we don't log _Ids in case of PII

bson.D{{Key: "$sample", Value: bson.D{{Key: "size", Value: int32(sampleSize)}}}},
bson.D{{Key: "$sort", Value: bson.D{{Key: DefaultDocumentKeyColumnName, Value: 1}}}},
bson.D{{Key: "$project", Value: bson.D{{Key: DefaultDocumentKeyColumnName, Value: 1}}}},
bson.D{{Key: "$sort", Value: bson.D{{Key: DefaultDocumentKeyColumnName, Value: 1}}}},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

more memory-efficient to sort after project to sort just the _ids (vs. sorting the entire documents).

@jgao54 jgao54 force-pushed the mongo-id-partitioning-fixes branch from f20f8ce to f3ee4af Compare July 3, 2026 00:56
@jgao54 jgao54 marked this pull request as ready for review July 3, 2026 00:56
@jgao54 jgao54 requested a review from a team as a code owner July 3, 2026 00:56
@jgao54 jgao54 force-pushed the mongo-id-partitioning-fixes branch from f3ee4af to b2cb5f8 Compare July 3, 2026 01:00
@jgao54 jgao54 force-pushed the mongo-id-partitioning-fixes branch from b2cb5f8 to fedb7df Compare July 3, 2026 01:01
@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

2 similar comments
@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Comment thread flow/connectors/mongo/qrep_partition.go Outdated
Co-authored-by: Ilia Demianenko <ilia.demianenko@clickhouse.com>
@jgao54 jgao54 enabled auto-merge (squash) July 7, 2026 17:37
@jgao54 jgao54 merged commit 107beb7 into main Jul 7, 2026
24 checks passed
@jgao54 jgao54 deleted the mongo-id-partitioning-fixes branch July 7, 2026 17:59
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