adoroszlai commented on code in PR #11184:
URL: https://github.com/apache/ozone/pull/11184#discussion_r4045149974
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SequenceIdGenerator.java:
##########
@@ -347,8 +348,7 @@ public static void upgradeToSequenceId(SCMMetadataStore
scmMetadataStore)
// operations can take effect exactly once in a SCM HA cluster.
if (sequenceIdTable.get(SequenceIdType.localId) == null) {
long millisSinceEpoch = TimeUnit.DAYS.toMillis(
- LocalDate.of(LocalDate.now().getYear() + 1, 1, 1).toEpochDay());
-
+ LocalDate.of(LocalDate.now(ZoneOffset.UTC).getYear() + 1, 1,
1).toEpochDay());
long localId = millisSinceEpoch << Short.SIZE;
Review Comment:
It would be nice to extract this to a function for easier testing.
--
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]