Using a hash function to avoid startup failures when the nodeIdentifier is too long

19 views
Skip to first unread message

Michael Musgrove

unread,
Oct 30, 2023, 1:14:38 PM10/30/23
to narayana-users
This discussion is related to a more generic discussion that we've already had on the topic [1] but I've raised it as a new one because it is specifically for Quarkus and I'd like to give people here the opportunity to discuss it over on the Quarkus issue [2] itself.

The context for the discussion is the nodeIdentifier property [3] which is used to track ownership of transaction branches (a branch or Xid is a resource's view of a transaction) and to stop different recovery managers from managing the same branch which could otherwise compromise the data integrity of a system. Typically runtimes such as WildFly or Quarkus will use things like the host name, pod name, container name etc as the value for the property, but if the length being set exceeds the 28 byte limit for the property then typically the application will fail to start up.

Quarkus would like to avoid startup failures by shortening the node identifier using the SHA-224 hash function which, in a 4 node cluster, for example, has a collision rate of about 1 in 10^60 (refer to [2] for the analysis) and, since this number is effectively zero, the risk is acceptable to them. For use cases where it isn't acceptable we've asked for a property that can control whether to hash the node identifier or to fail startup (if you have an opinion on what the default should be please contribute on the issue [2]).

So, to my question: is there any objection to allowing this change for Quarkus and if so then we should continue the discussion over on the Quarkus issue.

[1] https://groups.google.com/g/narayana-users/c/ttSff9HvXdA
[2] https://github.com/quarkusio/quarkus/issues/30491
[3] https://github.com/jbosstm/narayana/blob/7.0.0.Final/ArjunaCore/arjuna/classes/com/arjuna/ats/arjuna/common/CoreEnvironmentBean.java#L89

Marco Sappe Griot

unread,
Oct 31, 2023, 6:00:46 AM10/31/23
to narayana-users
Thanks Mike for the follow-up.
No objection from my side.


--
You received this message because you are subscribed to the Google Groups "narayana-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to narayana-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/narayana-users/420915a6-8269-4150-b274-935681b7a42en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages