[fix](group commit) fix repaly wal check label status (#38883) (#38997)

pick https://github.com/apache/doris/pull/38883
This commit is contained in:
meiyi
2024-08-07 22:06:59 +08:00
committed by GitHub
parent 773008d6fa
commit 749c9f7b56
7 changed files with 197 additions and 4 deletions

View File

@ -34,7 +34,8 @@ public class LabelAlreadyUsedException extends DdlException {
}
public LabelAlreadyUsedException(TransactionState txn) {
super("Label [" + txn.getLabel() + "] has already been used, relate to txn [" + txn.getTransactionId() + "]");
super("Label [" + txn.getLabel() + "] has already been used, relate to txn [" + txn.getTransactionId()
+ "], status [" + txn.getTransactionStatus() + "].");
switch (txn.getTransactionStatus()) {
case UNKNOWN:
case PREPARE:

View File

@ -1751,6 +1751,9 @@ public class FrontendServiceImpl implements FrontendService.Iface {
return result;
}
try {
if (DebugPointUtil.isEnable("FrontendServiceImpl.loadTxnRollback.error")) {
throw new UserException("FrontendServiceImpl.loadTxnRollback.error");
}
loadTxnRollbackImpl(request);
} catch (MetaNotFoundException e) {
LOG.warn("failed to rollback txn, id: {}, label: {}", request.getTxnId(), request.getLabel(), e);