Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor grouping to share logic, track duplicates #858

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

corps
Copy link
Contributor

@corps corps commented Jul 4, 2024

  1. Track duplicates with a sentry metric for observability.
  2. Generalize the neighbor search / insert logic by unifying two code paths. Effectively behavior remains the same as various subtle differences between the endpoints are accounted for in the new generalized logic.

@corps
Copy link
Contributor Author

corps commented Jul 4, 2024

Duplicates will happen, and we shouldn't stress them too much. They are a natural consequence of CAP and can occur for numerous reasons:

  1. Race conditions from retries
  2. Serialization in job queues not as strong as one thought (in fact, celery cannot guarantee non duplicate jobs in the strong sense, only best effort it)
  3. Future minor bugs

So observing but otherwise treating duplicates as expected system behavior simplifies behavior.

@corps corps requested a review from a team July 8, 2024 16: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.

1 participant