rpuch commented on code in PR #5391:
URL: https://github.com/apache/ignite-3/pull/5391#discussion_r1990722738
##########
modules/table/src/test/java/org/apache/ignite/internal/table/distributed/replication/PartitionReplicaListenerTest.java:
##########
@@ -2975,21 +2988,32 @@ private void cleanup(UUID txId) {
}
private void cleanup(UUID txId, boolean commit) {
- HybridTimestamp commitTs = clock.now();
+ TxState newTxState = commit ? COMMITTED : ABORTED;
- txManager.updateTxMeta(txId, old -> new TxStateMeta(COMMITTED,
UUID.randomUUID(), commitPartitionId, commitTs, null));
+ HybridTimestamp commitTs = clock.now();
+ HybridTimestamp commitTsOrNull = commit ? commitTs : null;
- WriteIntentSwitchReplicaRequest message =
TX_MESSAGES_FACTORY.writeIntentSwitchReplicaRequest()
- .groupId(tablePartitionIdMessage(grpId))
- .tableIds(Set.of(grpId.tableId()))
- .txId(txId)
- .commit(commit)
- .commitTimestamp(commitTs)
- .build();
+ txManager.updateTxMeta(txId, old -> new TxStateMeta(newTxState,
UUID.randomUUID(), commitPartitionId, commitTsOrNull, null));
- assertThat(partitionReplicaListener.invoke(message, localNode.id()),
willCompleteSuccessfully());
+ if (enabledColocation()) {
+ lockManager.releaseAll(txId);
+ partitionReplicaListener.cleanupLocally(txId, commit, commitTs);
Review Comment:
assertThat() here is actually a technicality; the important part is that
WriteIntentSwitchReplicaRequest is invoked on the listener. WIS does not work
for the colocation scenario with PartitionReplicaListener anymore (due to an
assertion in PartitionReplicaListener), so for the colocation scenario I had to
follow an alternative path of doing the 'cleanup' by hand. This is what new
lines do.
--
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]