weih1214 commented on pull request #10847:
URL: https://github.com/apache/flink/pull/10847#issuecomment-797293994
@Override
public void snapshotState(FunctionSnapshotContext context) throws
Exception {
LOG.debug("snapshot state, checkpointId={}",
context.getCheckpointId());
rollbackPreparedFromCheckpoint(context.getCheckpointId());
prepareCurrentTx(context.getCheckpointId());
beginTx(context.getCheckpointId() + 1);
stateHandler.store(of(preparedXids, hangingXids));
}
When calling beginTx(), it will start a new transaction with a new XID,
which will cause an Exception below
`XAER_RMFAIL: The command cannot be executed when global transaction is in
the PREPARED state`, right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]