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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/functions/HeartbeatTxnRangeFunction.java:
##########
@@ -82,7 +82,7 @@ public HeartbeatTxnRangeResponse 
execute(MultiDataSourceJdbcResource jdbcResourc
     }
     if (updateCnt == numTxnsToHeartbeat) {
       //fast pass worked, i.e. all txns we were asked to heartbeat were Open 
as expected
-      context.rollbackToSavepoint(savePoint);
+      context.createSavepoint();

Review Comment:
   FYI: I removed using `getEpochFn(jdbcResource.getDatabaseProduct())` from 
this change and switched back to the original way of calculating the timestamp, 
for two reasons: 
   - jdbc paramters are typed. And the framework knows the type of the columns. 
And I cannot use `getEpochFn(jdbcResource.getDatabaseProduct())` in a 
parmeterized query as for that column, it expects a bigint value (long in java 
side). And it doesn't run at all. The possible way to introduce it would be to 
use it as string, not a paramterized query. 
   - the other reason is that I checked other places when we use that column 
and I wanted to keep the code consistent: Change it at all places or not change 
at all. 
   
   I would consider doing it at an other, refactor ticket that I mentioned in 
my previous comment. 



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