Skip to content

Commit

Permalink
[Flaky-test]: Fix MLTransactionMetadataStoreTest.testInitTransactionR…
Browse files Browse the repository at this point in the history
…eader fails sporadically (apache#14532)

### Motivation

apache#14525 

When update states is `TxnStatus.COMMITTED`,  Not correctly `completableFuture.complete`.

### Modifications
- When update states is `TxnStatus.COMMITTED`, Add return to ending. Avoid direct calls `completableFuture.complete` from other logic.

### Documentation
- [x ] `no-need-doc`
  • Loading branch information
shibd authored Mar 3, 2022
1 parent 1a5c5db commit c15d0ef
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ public CompletableFuture<Void> updateTxnStatus(TxnID txnID, TxnStatus newStatus,
txnMetaMap.remove(txnID.getLeastSigBits());
completableFuture.complete(null);
});
return;
}
completableFuture.complete(null);
} catch (InvalidTxnStatusException e) {
Expand Down

0 comments on commit c15d0ef

Please sign in to comment.