HHH-18377 Fixed bug with sequence resetting

This commit is contained in:
Čedomir Igaly 2024-09-26 14:03:16 +02:00 committed by Christian Beikov
parent 69f8b9af2d
commit d8dd5e7c0d
1 changed files with 2 additions and 2 deletions

View File

@ -98,9 +98,9 @@ public class UuidVersion6Strategy implements UUIDGenerationStrategy, UuidValueGe
private long getSequence(final long currentTimestamp) {
lock.lock();
try {
if ( this.currentTimestamp > currentTimestamp ) {
if ( this.currentTimestamp < currentTimestamp ) {
this.currentTimestamp = currentTimestamp;
clockSequence.set( 0 );
clockSequence.updateAndGet( l -> l & 0x1FFFL );
}
}
finally {