veghlaci05 opened a new pull request #2981:
URL: https://github.com/apache/hive/pull/2981


   ### What changes were proposed in this pull request?
   
   This PR fixes the issue when the Heartbeater of the CompactionTxn is not 
shut down. This could happen if an exception is thrown from 
CompactionTxn.abort() or CompactionTxn.commit() which is not caught by the 
catch block. The fix reworks heartbeat handling the following way:
   1. The heartbeater is shut down BEFORE calling abort() or commit(), so 
regardless of the outcome of the transaction, or if an exception is thrown or 
not, the heartbeater won't stay alive. Another benefit that, this approach 
solves the logging after commit()/abort() issue too, without the need of the 
previously introduced additional logic (See: HIVE-25740).
   
   ### Why are the changes needed?
   To fix the issue that in some cases the heartbeater of a CompactionTxn is 
not shut down properly.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   
   Through unit tests.


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