Repository navigation
Replies: 3 comments 8 replies
|
Thank you @yrodiere for following up on this.
That is correct we lack built-in support with operator based usage. We also officially support at least 1 database that lacks XA support.
That is correct - at least from a built-in perspective. Almost all of our existing code paths are either writing to a single datasource, or are read-only across all sources. There is a concern that custom integration could do anything under the transaction though.
This was where we had wanted heuristic mixed exceptions to help expose a situation that did not commit successfully. @keycloak/core should weigh in here as well as to the transactional expectations - and how we expect users choosing to run in non-xa mode (possibly because of non-xa datasource(s)) to recover.
No, we are just going to rely on the workaround introduced to support the legacy behavior.
Foremost we need to avoid hard errors, and to make users aware if things may be in an inconsistent state - we have a workaround for the former, and a log message on the latter. I'm open to additional changes, but it's hard to envision exactly what that would be. We have our own transaction start / commit as part of the request / response cycle outside of more typical quarkus handling. At the time we're starting the transaction we don't currently have captured what type of path we are dealing with (ready-only, write to one and what particular source, or write to multiple). Ignoring the possiblity of custom logic introducing additional writes, could identify all built-in logic that falls into the write to multiple category and make targeted logic changes there. |
The semantics from Keycloak's perspective would be - with the annotation there would be a warning or hard error, depending upon the keycloak config, when more than 1 non-XA datasource is involved in the transaction. Without the annotation, no warning or error is expected. |
|
Now that we are finalizing our upgrade to 3.13 the thinking is that it will be simipler to not fight the direction of the safety check, and instead cut off support for multi-source scenarios with non-XA datasources. This should impact only a small amount of potential keyclaok usage, and we can assess any potential workarounds later if needed. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey all, @shawkins,
Some time ago, a breaking change happened in Quarkus, causing exceptions at runtime, and this led to the discovery of unsafe paths in Keycloak. When going through these paths, Keycloak could involve multiple non-XA datasources in the same transaction, which could lead to a transaction being committed in some datasources, but rolled back in others.
The breaking change (causing the runtime exceptions) was reverted in Quarkus 3.8.5, which Keycloak upgraded to, so it no longer affects Keycloak, and a flag was added to Quarkus so that any unsafe paths can be reported as warnings instead of triggering exceptions.
However, as far as I know, the unsafe paths remain. We discussed this at length with @shawkins, and from what I understand:
Having a way to mark transactions as read-only -- and thus make Narayana understand that it's safe to involve multiple non-XA resources -- would help .
I wanted us to continue our conversation on this topic, especially with @shawkins:
Thank you,
Yoann (Hibernate, Quarkus)
CC: @gsmet, @Sanne, @mmusgrov
All reactions