Skip to content

Conversation

@FGasper
Copy link
Collaborator

@FGasper FGasper commented Nov 26, 2024

This tweaks the document comparison from REP-5230 (PR #34) so that, instead of reading source and destination documents in series, they are read in parallel. This should improve comparison speed.

This copies syncmap and syncslice from mongosync.

@FGasper FGasper requested a review from tdq45gj November 26, 2024 13:29
@FGasper FGasper marked this pull request as draft November 26, 2024 13:31
@FGasper FGasper marked this pull request as ready for review November 26, 2024 14:27
Copy link
Collaborator

@tdq45gj tdq45gj left a comment

Choose a reason for hiding this comment

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

LGTM

@FGasper FGasper force-pushed the felipe_read_docs_parallel_redux branch 3 times, most recently from af5c21d to f972ec2 Compare November 30, 2024 18:37
This makes compareDocsFromChannels() use an errgroup to read its
document-reader channels in parallel.
- This makes reportutils.FmtBytes() postfix the unit after the number;
  previously it just returned the (stringified) number.
- This makes the “Check finished” log print if there is no error,
  not if there is an error. (The logic had been reversed.)
- This suppresses the “No tasks found” log. (PR mongodb-labs#60 meant to do this.)
- This unsets worker tracker entries once they are done being
  processed. (Previously they were not cleared, which made the worker
  tracker table much less meaningful because entries were never removed,
  only replaced.)
- This suppresses the findCmd log for recheck tasks since the
  list of IDs can be long.
- This suppresses the “Finished document comparison task” log if
  that task fails.
@FGasper FGasper force-pushed the felipe_read_docs_parallel_redux branch from f972ec2 to dc75294 Compare December 1, 2024 12:45
@FGasper FGasper merged commit baea449 into mongodb-labs:main Dec 2, 2024
33 checks passed
@FGasper FGasper deleted the felipe_read_docs_parallel_redux branch December 2, 2024 02:11
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