-
Notifications
You must be signed in to change notification settings - Fork 276
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
Development
: Prevent race condition when accessing build agent map
#8190
Development
: Prevent race condition when accessing build agent map
#8190
Conversation
WalkthroughThe recent update enhances the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
code lgtm
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.
code looks good 👍
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.
Manually tested on ts3, works as expected
.../tum/in/www1/artemis/service/connectors/localci/buildagent/SharedQueueProcessingService.java
Show resolved
Hide resolved
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.
Demonstrated in testing session. Code also lgtm
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
Development
: Prevent rare concurrency issue when accessing build agent mapDevelopment
: Prevent race condition when accessing build agent map
Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
While observing the Local CI I observed an error causing an issue in the build job management:
The initial exception that was caused by a concurrent access to a Hazelcast map and thrown in the
thenAccept
method of the CompletableFuture for the build job result.To handle normal build results and exceptions that have been thrown during the build job execution, we use
thenAccept
andexceptionally
methods respectively.thenAccept
gets called when everything went fine,exceptionally
when something went wrong during the build job execution. Both methods are chained and thus an exception thrown in thethenAccept
method can trigger the execution of theexceptionally
method which is not desired.Description
thenAccept
andexceptionally
methods get separated instead of chaining themSteps for Testing
Test on TS3 or TS6
There isn't really a great way to test this, as the initial error rarely happened. You can test whether the exception handling for exceptions during the build job execution still works.
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Summary by CodeRabbit