Browse Source

fixbug

tags/v1.0.1
liu.xiaomin 4 years ago
parent
commit
edb393125a
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      pkg/tc/holder/session_holder.go
  2. +2
    -2
      pkg/tc/server/default_coordinator.go

+ 3
- 0
pkg/tc/holder/session_holder.go View File

@@ -80,6 +80,9 @@ func (sessionHolder SessionHolder) reload() {
}
switch globalSession.Status {
case meta.GlobalStatusCommitting, meta.GlobalStatusCommitRetrying:
if globalSession.Status == meta.GlobalStatusCommitting {
globalSession.Status = meta.GlobalStatusCommitRetrying
}
sessionHolder.RetryCommittingSessionManager.AddGlobalSession(globalSession)
break
case meta.GlobalStatusRollingBack, meta.GlobalStatusRollbackRetrying, meta.GlobalStatusTimeoutRollingBack,


+ 2
- 2
pkg/tc/server/default_coordinator.go View File

@@ -143,7 +143,7 @@ func (coordinator *DefaultCoordinator) processRetryRollingBack() {
timer := time.NewTimer(coordinator.conf.RollingBackRetryPeriod)
select {
case <-timer.C:
coordinator.handleRetryRollbacking()
coordinator.handleRetryRollingBack()
}
timer.Stop()
}
@@ -214,7 +214,7 @@ func (coordinator *DefaultCoordinator) timeoutCheck() {
log.Debug("Transaction Timeout Check End.")
}

func (coordinator *DefaultCoordinator) handleRetryRollbacking() {
func (coordinator *DefaultCoordinator) handleRetryRollingBack() {
rollingBackSessions := holder.GetSessionHolder().RetryRollbackingSessionManager.AllSessions()
if rollingBackSessions == nil && len(rollingBackSessions) <= 0 {
return


Loading…
Cancel
Save