-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Blockhound error when running with transaction with a TransactionOperator #26955
Comments
Since we're only using that UUID for logging purposes, even just synchronization trace logging that we could get rid of completely (with standard as well as reactive transactions), I'm inclined to make UUID generation lazy there - and to deprecate its accessors. @mp911de what's your take on this? Are you aware of any use of the context id (or the name including the context id) outside of the core transaction module? |
I'm not aware of any outside usage, even Spring Data R2DBC doesn't use the context. In retrospect, using a |
Alright, I'll proceed with the steps above then. Let's revisit the transaction identification problem in Spring Framework 6 indeed, and simply keep the current mechanism in deprecated form for the time being. Most importantly, by lazily creating the UUID, we'll avoid the overhead (and the potential blocking) for every created transaction. With the trace log statements removed, this effectively means that we'll never trigger that UUID to begin with, unless some custom code calls |
Includes removal of trace logging for individual synchronization steps. Closes spring-projectsgh-26955
When running Blockhound on my project it detects this UUID generation as a blocking call. I am thinking that it should be updated and maybe you can set the creation of this class on a separate thread pool or fix the issue with generating the
id
of theTransactionContext
.spring-framework/spring-tx/src/main/java/org/springframework/transaction/reactive/TransactionContext.java
Line 43 in 360f555
This is the stack trace from Blockhound
The text was updated successfully, but these errors were encountered: