You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/11/26 10:11:54 UTC

[GitHub] [hive] marton-bod commented on a change in pull request #2817: HIVE-25740: Stop compaction heartbeating before abort/commit txn

marton-bod commented on a change in pull request #2817:
URL: https://github.com/apache/hive/pull/2817#discussion_r757361747



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -748,6 +736,7 @@ void wasSuccessful() {
      * @throws Exception
      */
     @Override public void close() throws Exception {
+      shutdownHeartbeater();

Review comment:
       > "Theoretically this have the same issue as before the patch, just the other way around. We stop the heartbeat, the transaction times out, and we try to commit / abort."
   
   That's true, this was my first thought as well. However, I think shutting down the heartbeater should be really fast and not cause problems in healthy systems. If it's waiting to be scheduled by the executor (which is most of the time), it will be shut down immediately. Otherwise it'll do one more heartbeating, but that heartbeating would need to take minutes (in line with the value of `hive.txn.timeout`) to cause any problems. If the heartbeating takes that long then we have other issues in the system anyway.
   
   > "How complicated would it be to turn off exception handling in the heart beater instead first, and stop it after abort / commit?"
   
   Can you elaborate on what you mean by turning off exception handling? I think the general problem would remain: we commit/abort the txn and then send a signal to the heartbeater thread to stop doing whatever it's currently doing, but if it has already called the `msc.heartbeat()` method by that point (or it's just about to call it), there's nothing much we can do and it will lead to failure.




-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org