Skip to content

Commit 0b45307

Browse files
author
ffffwh
committed
cleanup
1 parent b07398b commit 0b45307

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ for details on submitting patches and the contribution workflow.
2727

2828
## Contact us
2929

30-
*dtle* has enterprise support plan, you may contact our sales team:
30+
*dtle* has an enterprise support plan. You may contact our sales team:
3131
* Global Sales: 400-820-6580
3232
* North China: 86-13718877200, Mr.Wang
3333
* South China: 86-18503063188, Mr.Cao

driver/mysql/applier_incr.go

+1
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ func (a *ApplierIncr) handleEntry(entryCtx *common.EntryContext) (err error) {
282282
if err != nil {
283283
return errors.Wrapf(err, "rollback on resent big tx")
284284
}
285+
// let WaitForAllCommitted() pass
285286
a.mtsManager.lastEnqueue = 0
286287
a.inBigTx = false
287288
}

driver/state.go

-28
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import (
44
"fmt"
55
"strings"
66
"sync"
7-
8-
"github.com/actiontech/dtle/driver/common"
97
)
108

119
type taskStore struct {
@@ -58,32 +56,6 @@ func (ts *TaskStoreForApi) Set(allocId, taskName, taskId string, handle *taskHan
5856
ts.store[key] = handle
5957
}
6058

61-
// it can only use allocId and taskName to identify the task from http api
62-
func (ts *TaskStoreForApi) GetTaskStatistics(allocId, taskName string) (*common.TaskStatistics, bool, error) {
63-
ts.lock.RLock()
64-
defer ts.lock.RUnlock()
65-
66-
prefix := fmt.Sprintf("%v-%v-", allocId, taskName)
67-
for k, _ := range ts.store {
68-
if strings.HasPrefix(k, prefix) {
69-
t, ok := ts.store[k]
70-
71-
var stats *common.TaskStatistics
72-
if t.runner != nil {
73-
var err error
74-
stats, err = t.runner.Stats()
75-
if nil != err {
76-
return nil, false, fmt.Errorf("get stats from taskHandle failed: %v", err)
77-
}
78-
} else {
79-
stats = &common.TaskStatistics{}
80-
}
81-
return stats, ok, nil
82-
}
83-
}
84-
return nil, false, nil
85-
}
86-
8759
func (ts *TaskStoreForApi) Delete(id string) {
8860
ts.lock.Lock()
8961
defer ts.lock.Unlock()

0 commit comments

Comments
 (0)