deniskuzZ commented on code in PR #5186:
URL: https://github.com/apache/hive/pull/5186#discussion_r1558992350
##########
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:
since we have `LockMaterializationRebuildFunction` and separate functions
for heartbeat `HeartbeatLockFunction`, `HeartbeatTxnFunction`, maybe we should
extract this code into a function as well
--
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]