Skip to content

Conversation

@neSpecc
Copy link
Member

@neSpecc neSpecc commented Sep 30, 2024

When many similar events processed in parallel, check for isFirstOccurence returns falsy-false value since we have no db lock. So all second events are processed as the first one.

We have a special try-catch statement that handles this case by catching Mongo "duplicate error". This statement re-runs processing for a particular event. But looks like we've lost return there, so on each re-run increment was added anyway

@neSpecc neSpecc merged commit ced34da into master Sep 30, 2024
3 checks passed
@neSpecc neSpecc deleted the fix-parallel-increment branch September 30, 2024 21:16
neSpecc added a commit that referenced this pull request Sep 30, 2024
* Changed the content of the limit events email (#319)

* Update html.twig

Change the description email

* Change email's title

* Update index.ts (#322)

---------

Co-authored-by: Alexander Chernyaev <[email protected]>
Co-authored-by: Peter <[email protected]>
nikmel2803 added a commit that referenced this pull request Dec 4, 2024
* Changed the content of the limit events email (#319)

* Update html.twig

Change the description email

* Change email's title

* Update index.ts (#322)

* add error log (#324)

---------

Co-authored-by: Alexander Chernyaev <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Nikita Melnikov <[email protected]>
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.

4 participants