Skip to content

Conversation

@ikreymer
Copy link
Member

  • use update_many to add/remove all
  • use $addToSet instead of $push to ignore duplicates - this also avoids the crawl_already_in_collection errors, the operation becomes a nop if crawl already in collection.

@ikreymer ikreymer requested a review from tw4l September 30, 2025 20:09
- use update_many to add/remove all
- use $addToSet instead of $push to ignore duplicates
@tw4l tw4l force-pushed the bulk-add-remove-optimize branch from 2a86eec to 4317507 Compare September 30, 2025 21:16
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

Nice optimization, thanks!

@ikreymer ikreymer merged commit ce04751 into main Sep 30, 2025
24 checks passed
@ikreymer ikreymer deleted the bulk-add-remove-optimize branch September 30, 2025 21:56
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