deniskuzZ commented on code in PR #5186:
URL: https://github.com/apache/hive/pull/5186#discussion_r1574261500


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -705,12 +706,11 @@ public LockResponse lockMaterializationRebuild(String 
dbName, String tableName,
   public boolean heartbeatLockMaterializationRebuild(String dbName, String 
tableName, long txnId) throws MetaException {
     int result = jdbcResource.execute(
         "UPDATE \"MATERIALIZATION_REBUILD_LOCKS\"" +
-            " SET \"MRL_LAST_HEARTBEAT\" = " + Instant.now().toEpochMilli() +
-            " WHERE \"MRL_TXN_ID\" = " + txnId +
-            " AND \"MRL_DB_NAME\" = ?" +
-            " AND \"MRL_TBL_NAME\" = ?",
+            " SET \"MRL_LAST_HEARTBEAT\" = " + 
getEpochFn(jdbcResource.getDatabaseProduct()) +

Review Comment:
   HIVE-6965: Transaction manager should use RDBMS time instead of machine 
time. Determine the current time, using the RDBMS as a source of truth.
   
   However, since it's only used for MV rebuild that's probably ok
   
   



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

Reply via email to