-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Agroal - Allow to configure transaction isolation level #1122 #1778
Conversation
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.
@machi1990 nice work. I just added a comment regarding the config property name. I think we'd better be explicit.
@@ -8,3 +8,4 @@ quarkus.datasource.background-validation-interval=PT53S | |||
quarkus.datasource.acquisition-timeout=PT54S | |||
quarkus.datasource.leak-detection-interval=PT55S | |||
quarkus.datasource.idle-removal-interval=PT56S | |||
quarkus.datasource.transaction-isolation=SERIALIZABLE |
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.
I think I would have named it transaction-isolation-level
.
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.
Done.
@machi1990 I'm wondering if we should have our own enum for the isolation level values. Right now, we are totally tied to the Agroal values and I think it would be better if we had our own enum. I think I would have string values like We would then translate the values to the Agroal values. What do you think of this proposal? |
@gsmet, I like the idea. It will totally abstract the end user from the Agroal’s transaction isolation level enum. I’ll take this into account. A small downside will be maintaining our own enum, should there be any breaking change in Agroal. |
...nsions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/TransactionIsolationLevel.java
Show resolved
Hide resolved
I'm waiting for #1815 to get in so that the enum is not formatted as it is right now as it's barely readable. |
Okay. I'll rebase afterwards. |
@machi1990 don't worry about it, I already have everything ready. |
@machi1990 I just pushed a rebase to your branch with the new formatting. I'm waiting for CI and will merge. Thanks a lot for this one. |
Cool. Thanks for the valuable feedback. |
thanks @machi1990 and @gsmet ! Looks very useful |
Merged, thanks @machi1990 ! |
The PR adds the possibility to define database transaction isolation level using
quarkus.datasource.transaction-isolation
config property.@gsmet