franz1981 commented on a change in pull request #3950:
URL: https://github.com/apache/activemq-artemis/pull/3950#discussion_r811426048



##########
File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/jdbc/JdbcLeaseLock.java
##########
@@ -147,14 +148,13 @@ private long dbCurrentTimeMillis(Connection connection) 
throws SQLException {
          try (ResultSet resultSet = currentDateTime.executeQuery()) {
             resultSet.next();
             final long endTime = stripMilliseconds(System.currentTimeMillis());
-            final Timestamp currentTimestamp = resultSet.getTimestamp(1);
-            final long currentTime = currentTimestamp.getTime();
-            final long currentTimeMillis = stripMilliseconds(currentTime);
-            if (currentTimeMillis < startTime) {
-               LOGGER.warnf("[%s] %s query currentTimestamp = %s on database 
should happen AFTER %s on broker", lockName, holderId, currentTimestamp, new 
Timestamp(startTime));
+            final long currentTime = resultSet.getTimestamp(1, 
Calendar.getInstance(TimeZone.getTimeZone("UTC"))).getTime();
+            final long currentTimeNoMillis = stripMilliseconds(currentTime);
+            if (currentTimeNoMillis < startTime) {

Review comment:
       Given that verification here won't imply anything but some output 
message probably `verify` can be omitted (unless I'll decide to perform a 
proper validation with thrown exception)




-- 
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]


Reply via email to