You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Javers fails under load in distributed applications during commit: org.javers.common.exception.JaversException: CANT_SAVE_ALREADY_PERSISTED_COMMIT: can't save already persisted commit '37140.0'.
We use MySQL database, and Spring integration module.
Seems like the following situation occurs:
On the first application instance we called javers.commit(...) in transaction - it retrieved max commit_id from database and then increased it.
On the second application instance we also called javers.commit(...) in another transaction - it retrieved the same max commit_id as in step Initial diff #1 and also increased it by one. (first transaction is not committed yet)
First application instance committed transaction - data successfully saved to database.
Second application instance committed transaction - we got exception as above, as data with the same commit_id already exist in database after first transaction completion.
_We saw that CommitIdGenerator contains both: SYNCHRONIZED_SEQUENCE and RANDOM (for distributed applications), but RANDOM generator is deprecated, do we have some alternative generator for distributed applications? What can we undertake to fix the issue?
Javers fails under load in distributed applications during commit: org.javers.common.exception.JaversException: CANT_SAVE_ALREADY_PERSISTED_COMMIT: can't save already persisted commit '37140.0'.
We use MySQL database, and Spring integration module.
Seems like the following situation occurs:
_We saw that CommitIdGenerator contains both: SYNCHRONIZED_SEQUENCE and RANDOM (for distributed applications), but RANDOM generator is deprecated, do we have some alternative generator for distributed applications? What can we undertake to fix the issue?
Full Stacktrace
stacktrace.txt