Skip to content

SYNC-370 - Ensure thread locale variables are cleaned up properly in …#60

Open
mseaton wants to merge 1 commit intomasterfrom
SYNC-370
Open

SYNC-370 - Ensure thread locale variables are cleaned up properly in …#60
mseaton wants to merge 1 commit intomasterfrom
SYNC-370

Conversation

@mseaton
Copy link
Copy Markdown
Member

@mseaton mseaton commented Oct 29, 2025

…the interceptor

@mseaton mseaton requested a review from mogoodrich October 29, 2025 20:52
Copy link
Copy Markdown
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Not sure exactly what the process registered variable is used for without seeing further code, but I trust you!

@mseaton
Copy link
Copy Markdown
Member Author

mseaton commented Oct 30, 2025

Not sure exactly what the process registered variable is used for without seeing further code, but I trust you!

I was hoping a bit that you would sanity check me on this one.

@mogoodrich
Copy link
Copy Markdown
Member

Okay, will do! @mseaton

Copy link
Copy Markdown
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

See updated thoughts @mseaton

if (record == null || expected == null || !expected.equals(tx)) {
throw new IllegalStateException("Ending transaction did not find the expected transaction on the stack");
}
syncRecordThreadLocal.get().setProcessRegistered(tx, false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

processRegistered is a thread local variable that is used to record if a transaction has been to be registered on a current thread, and this changes things so that when we end a transaction instead of just setting the that the key-value to false it removes that record entirely? It also makes sure the transaction gets removed in case of n error case? This all makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants