Skip to content
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

HHH-7910 Transaction timeout can cause non-threadsafe session access by reaper thread #476

Closed
wants to merge 1 commit into from

Conversation

brmeyer
Copy link
Member

@brmeyer brmeyer commented Feb 21, 2013

No description provided.

@@ -51,8 +51,13 @@
private ManagedFlushChecker managedFlushChecker;
private AfterCompletionAction afterCompletionAction;
private ExceptionMapper exceptionMapper;

private static final int NO_STATUS = -1;
private long registrationThreadId;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registrationThreadId can be final I think.

@brmeyer
Copy link
Member Author

brmeyer commented Mar 1, 2013

@scottmarlow @sebersole Can you re-review? The thread ID is checked on pulse. Delayed action handling occurs only on rollback. Added a setting to completely disable the check.

Can you help me rename the setting and its accompanying text? Not happy with it -- writer's block.

@brmeyer brmeyer closed this Mar 8, 2013
@@ -119,6 +127,35 @@ private void setRollbackOnly() {
}

public void afterCompletion(int status) {
if ( !settings.isJtaThreadHandling() || isRegistrationThread() ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, we should have (re)checked this ;)

Unless I am missing something, don't we miss calling doAfterCompletion (immediately or delayed) when afterCompletion is called with SUCCESS from a "non-main" thread

  1. the thread checks res

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, good catch. Had that originally -- not sure what happened to it. I'll fix and push in a sec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants