-
Notifications
You must be signed in to change notification settings - Fork 11
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
add missing synchronization context needed for rule's matchedTimes #38
add missing synchronization context needed for rule's matchedTimes #38
Conversation
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
==========================================
+ Coverage 98.46% 98.48% +0.01%
==========================================
Files 23 23
Lines 196 198 +2
Branches 18 18
==========================================
+ Hits 193 195 +2
Misses 1 1
Partials 2 2
Continue to review full report at Codecov.
|
@@ -40,33 +40,34 @@ public BuildHistoryManager(List<Rule> rules) { | |||
*/ | |||
@Override | |||
public void perform(Job<?, ?> job) throws IOException, InterruptedException { | |||
synchronized (this) { |
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.
first, this can go to method signature as you synchronize whole method
second - the problem happens when plugin is executed twice at the same time?
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.
second - yes this happend quite frequently on our server.
e.g. if the hourly check and the check on start of the build is executed at the same time
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.
first applied
Good job, thanks! |
No description provided.