rocketmq
rocketmq copied to clipboard
transaction message commit success still checkLocalTransaction
RocketMqServer 4.4.0 server broker get WARN log,
2020-10-16 12:58:15 WARN EndTransactionThread_35 - Check producer[172.20.153.16:41418] transaction state, the producer commit the message.RequestHeader: EndTransactionRequestHeader{producerGroup='XXXX', tranStateTableOffset=28244998, commitLogOffset=36496939284664, commitOrRollback=8, fromTransactionCheck=true, msgId='AC192B7A0001762EFE5D5007AF76A48F', transactionId='AC192B7A0001762EFE5D5007AF76A48F'} Remark: null
in prod env, some transaction msg comment success, rocketBroker still checkLocalTransaction。 in test env is fine。
You can check the network between your prod env machine and your producer machine.
LocalTransactionState localTransactionState = LocalTransactionState.UNKNOW;
Throwable localException = null;
switch (sendResult.getSendStatus()) {
case SEND_OK: {
try {
if (sendResult.getTransactionId() != null) {
msg.putUserProperty("__transactionId__", sendResult.getTransactionId());
}
String transactionId = msg.getProperty(MessageConst.PROPERTY_UNIQ_CLIENT_MESSAGE_ID_KEYIDX);
if (null != transactionId && !"".equals(transactionId)) {
msg.setTransactionId(transactionId);
}
if (null != localTransactionExecuter) {
localTransactionState = localTransactionExecuter.executeLocalTransactionBranch(msg, arg);
} else if (transactionListener != null) {
log.debug("Used new transaction API");
localTransactionState = transactionListener.executeLocalTransaction(msg, arg);
}
if (null == localTransactionState) {
localTransactionState = LocalTransactionState.UNKNOW;
}
if (localTransactionState != LocalTransactionState.COMMIT_MESSAGE) {
log.info("executeLocalTransactionBranch return {}", localTransactionState);
log.info(msg.toString());
}
} catch (Throwable e) {
log.info("executeLocalTransactionBranch exception", e);
log.info(msg.toString());
localException = e;
}
}
break;
case FLUSH_DISK_TIMEOUT:
case FLUSH_SLAVE_TIMEOUT:
case SLAVE_NOT_AVAILABLE:
localTransactionState = LocalTransactionState.ROLLBACK_MESSAGE;
break;
default:
break;
}
try {
this.endTransaction(sendResult, localTransactionState, localException);
} catch (Exception e) {
log.warn("local transaction execute " + localTransactionState + ", but end broker transaction failed", e);
}
i not find log info,
- local transaction execute fail, get
log.info("executeLocalTransactionBranch return {}", localTransactionState);
log.info("executeLocalTransactionBranch exception", e)
- end transaction exception get log
log.warn("local transaction execute " + localTransactionState + ", but end broker transaction failed", e);
it seems client submit success, server log get WARN EndTransactionThread,
upgrade to 4.6.x or upper may resolve your problem.
and keep transientStorePoolEnable=false
The problem still exists version:4.7.1 config:transientStorePoolEnable=false
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
This issue was closed because it has been inactive for 3 days since being marked as stale.