You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the solution you'd like
There is a DistributedTransactionManager
func (manager *DistributedTransactionManager) branchCommit(bs *api.BranchSession) (api.BranchSession_BranchStatus, error) {
db := resource.GetDBManager().GetDB(bs.ResourceID)
if db == nil {
return 0, fmt.Errorf("DB resource is not exist, db name: %s", bs.ResourceID)
}
if err := GetUndoLogManager().DeleteUndoLogByXID(db, bs.XID); err != nil {
return api.PhaseTwoCommitting, err
}
if err := manager.storageDriver.DeleteBranchSession(context.Background(), bs.BranchID); err != nil {
log.Error(err)
}
log.Debugf("branch session committed, branch id: %s, lock key: %s", bs.BranchID, bs.LockKey)
return api.Complete, nil
}
When calling branchCommit method, should judge the type of BranchSession, if the branch type is api.TCC, should send http request to CommitRequestPath, the CommitRequestPath is serialized into ApplicationData of BranchSession.
When calling branchRollback should to the same thing as above.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
There is a DistributedTransactionManager
When calling
branchCommit
method, should judge the type of BranchSession, if the branch type isapi.TCC
, should send http request toCommitRequestPath
, theCommitRequestPath
is serialized intoApplicationData
ofBranchSession
.When calling
branchRollback
should to the same thing as above.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: