jacek-lewandowski commented on code in PR #2830:
URL: https://github.com/apache/cassandra/pull/2830#discussion_r1374381955
##########
src/java/org/apache/cassandra/utils/TimeUUID.java:
##########
@@ -411,9 +437,28 @@ public static byte[] nextTimeUUIDAsBytes()
return
toBytes(rawTimestampToMsb(unixMicrosToRawTimestamp(nextUnixMicros())),
clockSeqAndNode);
}
+ public static byte[] nextTimeUUIDAsBytes(long unixMicrosAtLeast)
+ {
+ long useThisUnixMicros = unixMicrosAtLeast;
+ if(unixMicrosAtLeast>lastMicros.get())
+ {
+ lastMicros.set(unixMicrosAtLeast+1);
Review Comment:
I think you should rather do CAS operation than just setting a value
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]