-
Notifications
You must be signed in to change notification settings - Fork 565
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
fix(gtw/jobs): ignore notifications if already scheduled #8317
Conversation
8face80
to
5de9109
Compare
@deepthidevaki, can you please review this PR? In the case, you can't make it this week anymore, then please let me know. Regarding a unit test to cover that scenario, I tried different approaches to write a working unit test but did not succeed. If you see any option, how to write a test case, therefore, then please let me know. I am happy to receive your ideas. |
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.
LGTM 🚀
I cannot think of a way to test it other than what we already discussed. Since the existing Long polling tests works, we can assume that it did not break the existing behavior. That would be enough.
Before merging this PR:
- Could you update the commit message to include a small test describing the reasoning behind these changes. Basically what you have added in the PR description.
- Have you already run a benchmark to ensure that this fixed the issue?
Thanks for your review.
Will do!
Yes, I run the benchmark today and last week, it's documented in the issue itself: #8267 (comment) |
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.
👍
* Ignore incoming notifications if a notification is already scheduled/running for the given job type * Changes the type from `HashMap` to `ConcurrentHashMap` of field `LongPollingActivateJobsHandler#jobTypeState` because it is accessed by different threads: * Actor Thread who does reads and updates to the map * "Netty Threads" who notifies the gateway when newly jobs are available
5de9109
to
fe73f53
Compare
bors r+ |
Build succeeded: |
Successfully created backport PR #8345 for |
Successfully created backport PR #8346 for |
8346: [Backport stable/1.2] fix(gtw/jobs): ignore notifications if already scheduled r=romansmirnov a=github-actions[bot] # Description Backport of #8317 to `stable/1.2`. relates to #8267 8387: [Backport stable/1.2] fix(journal): always release acquired read lock r=romansmirnov a=github-actions[bot] # Description Backport of #8372 to `stable/1.2`. relates to #8369 Co-authored-by: Roman <roman.smirnov@camunda.com>
Description
HashMap
toConcurrentHashMap
of fieldLongPollingActivateJobsHandler#jobTypeState
because it is accessed by different threadsRelated issues
closes #8267
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/0.25
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation: