We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb03db7 commit 48fa03fCopy full SHA for 48fa03f
hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion6Strategy.java
@@ -98,9 +98,9 @@ public UUID generateUuid(SharedSessionContractImplementor session) {
98
private long getSequence(final long currentTimestamp) {
99
lock.lock();
100
try {
101
- if ( this.currentTimestamp > currentTimestamp ) {
+ if ( this.currentTimestamp < currentTimestamp ) {
102
this.currentTimestamp = currentTimestamp;
103
- clockSequence.set( 0 );
+ clockSequence.updateAndGet( l -> l & 0x1FFFL );
104
}
105
106
finally {
0 commit comments