Skip to content

Conversation

@FGasper
Copy link
Collaborator

@FGasper FGasper commented Nov 4, 2025

Commit 440bcb4 added logic to deduplicate rechecks on insert. With large inserts, though, that logic hurts more than it helps.

@FGasper FGasper requested a review from tdq45gj November 4, 2025 19:07
@FGasper FGasper marked this pull request as ready for review November 4, 2025 19:08
generation, _ := verifier.getGenerationWhileLocked()

eg, groupCtx := contextplus.ErrGroup(ctx)
eg.SetLimit(100)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are we setting the limit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without this, the driver fails requests with errors about not being able to get a thread within 30s or so. This way we throttle the requests to avoid “upsetting” the driver.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. Would appreciate this information to be added to code comment.

@FGasper FGasper merged commit 17f7c8d into mongodb-labs:main Nov 5, 2025
99 checks passed
@FGasper FGasper deleted the felipe_remove_deduplicate_recheck branch November 5, 2025 18:17
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