alexeykudinkin commented on a change in pull request #4373:
URL: https://github.com/apache/hudi/pull/4373#discussion_r772626459



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/TransactionManager.java
##########
@@ -85,7 +85,7 @@ public void endTransaction(Option<HoodieInstant> 
currentTxnOwnerInstant) {
   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())) {

Review comment:
       We should do this check outside of `reset` and only invoke if it passes




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


Reply via email to