-
Notifications
You must be signed in to change notification settings - Fork 95
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
CMR-10194: Exception During Collection Draft Publish (Delete) #2204
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2204 +/- ##
==========================================
- Coverage 58.27% 58.26% -0.02%
==========================================
Files 1056 1056
Lines 71082 71096 +14
Branches 2033 2030 -3
==========================================
Hits 41422 41422
- Misses 27765 27778 +13
- Partials 1895 1896 +1 ☔ View full report in Codecov by Sentry. |
If the solution is to allow the first item off the queue to handle both deletes, then I think you should only push onto one queue from the publish action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this addresses the race condition misread a when
as an if
Even if we publish to one queue from the publish side, we'll still need this separation of funcs with a delete-draft-concept func. The only difference would be that it would no longer need to catch an exception and ignore it. I can make the publish API write to one queue instead, but that will require a lot of changes to the funcs it calls. Currently, the publish endpoint calls the metadata /concepts API that eventually writes to the two queues. I can create new funcs within metadata that only writes to one queue instead and then redo all the other funcs that call it. It's about 6 func calls. I'll need to create new instead of updating the current funcs, because a lot of other flows rely on the current delete concept flow as it is and it needs to remain the same I originally decided against it because we might do a full re-design of this entire flow anyway. But I am open to changing the publish func to write to one queue and then writing new funcs for the new draft flow. |
Do you mean that you don't believe this solves the race condition? If so, I agree. I think the only solution is to do a re-design, rather than a hot-fix solution like this |
Discussed offline, turns out I had misread part of the PR |
Overview
What is the feature/fix?
High rate of errors where the Collection Draft instance has been deleted from Oracle but is still indexed in Elasticsearch.
What is the Solution?
Error was caused by race condition between two queues with same concept-delete msg that indexer picks up and uses to find concept in db and delete from 2 es indices. But if one index instance deletes from the db first, the other will not delete from second es index.
Current solution is to delete from both indexes at same time from 1 queue and ignoring the 'concept not found in db' when read again from 2nd queue.
What areas of the application does this impact?
Delete any draft concept
Checklist