1
0

[HUDI-3029] Transaction manager: avoid deadlock when doing begin and end transactions (#4373)

This commit is contained in:
Manoj Govindassamy
2021-12-18 08:43:10 -08:00
committed by GitHub
parent d1d48ed494
commit 733732be7b
2 changed files with 17 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ public class TransactionManager implements Serializable {
private synchronized void reset(Option<HoodieInstant> callerInstant,
Option<HoodieInstant> newTxnOwnerInstant,
Option<HoodieInstant> lastCompletedTxnOwnerInstant) {
if (!this.currentTxnOwnerInstant.isPresent() || this.currentTxnOwnerInstant == callerInstant) {
if (!this.currentTxnOwnerInstant.isPresent() || this.currentTxnOwnerInstant.get().equals(callerInstant.get())) {
this.currentTxnOwnerInstant = newTxnOwnerInstant;
this.lastCompletedTxnOwnerInstant = lastCompletedTxnOwnerInstant;
}