HW-53073: Allow Thread Interruption for WriteLockManager#1
Open
HW-53073: Allow Thread Interruption for WriteLockManager#1
Conversation
jportner-hw
approved these changes
May 27, 2019
dkoch-hw
reviewed
Jun 3, 2019
...g.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/WriteLockManager.java
Show resolved
Hide resolved
jportner-hw
approved these changes
Jun 4, 2019
jportner-hw
reviewed
Jun 19, 2019
...g.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/WriteLockManager.java
Outdated
Show resolved
Hide resolved
jportner-hw
approved these changes
Jun 24, 2019
jportner-hw
approved these changes
Jul 4, 2019
dkoch-hw
reviewed
Jul 4, 2019
| public static final int MAX_WAIT = 600000; //10 mins | ||
| private static final int SIXTY_SECONDS = 60; //1 minute | ||
| private static final int SEVENTY_SECONDS = 70; //Once we reached 70s, we can assume we are in a bad state, so allow interruption for everything. | ||
| private static final int SEVENTY_SECONDS = 130; //Once we reached 130s, we can assume we are in a bad state, so allow interruption for everything. |
There was a problem hiding this comment.
comment isn't accurate. Should be
// Once we reach SECONDS_BEFORE_HONOUR_INTERRUPT we consider the node in bad state for SECONDS_IN_BAD_STATE seconds. During which time, we will honour all interrupts.
| @@ -66,7 +66,7 @@ public class WriteLockManager { | |||
|
|
|||
| public static final int MAX_WAIT = 600000; //10 mins | |||
| private static final int SIXTY_SECONDS = 60; //1 minute | |||
There was a problem hiding this comment.
Constant should be named for their purpose, not their value.
SIXTY_SECONDS should be SECONDS_BEFORE_HONOUR_INTERRUPT
SEVENTY_SECONDS should be SECONDS_IN_BAD_STATE
jportner-hw
approved these changes
Jul 22, 2019
jportner-hw
approved these changes
Jul 23, 2019
| private static boolean isInterruptionEnabled() { | ||
| String value = System.getProperty("interruptionEnabled"); | ||
| return parseBoolean(value); | ||
| } |
There was a problem hiding this comment.
pretty simple. best of the hacky approaches imo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.