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 014d311 commit 5e24fd4Copy full SHA for 5e24fd4
hibernate-core/src/main/java/org/hibernate/id/uuid/UuidVersion7Strategy.java
@@ -64,7 +64,7 @@ public State getNextState() {
64
return new State( now, randomSequence() );
65
}
66
else {
67
- final long nextSequence = lastSequence + Holder.numberGenerator.nextLong( 0xFFFF_FFFFL );
+ final long nextSequence = lastSequence + Holder.numberGenerator.nextLong( 0xFFFF_FFFEL ) + 1;
68
return nextSequence > MAX_RANDOM_SEQUENCE
69
? new State( lastTimestamp.plusNanos( 250 ), randomSequence() )
70
: new State( lastTimestamp, nextSequence );
0 commit comments