-
Notifications
You must be signed in to change notification settings - Fork 3
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
HW-53073: Allow Thread Interruption for WriteLockManager #1
base: 2.7
Are you sure you want to change the base?
Conversation
...g.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/WriteLockManager.java
Show resolved
Hide resolved
...g.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/WriteLockManager.java
Outdated
Show resolved
Hide resolved
@@ -66,7 +66,7 @@ | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 static final int MAX_WAIT = 600000; //10 mins | |||
private static final int SIXTY_SECONDS = 60; //1 minute |
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.
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
return interruptionEnabled; | ||
private static boolean isInterruptionEnabled() { | ||
String value = System.getProperty("interruptionEnabled"); | ||
return parseBoolean(value); | ||
} |
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.
pretty simple. best of the hacky approaches imo.
No description provided.