Skip to content

Commit

Permalink
fix: [2.4] Remove sync task after finished (#38681) (#38686)
Browse files Browse the repository at this point in the history
Cherry-pick from master
pr: #38681
Related to #38680

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Dec 24, 2024
1 parent afaabc2 commit 5fd69a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/datanode/syncmgr/sync_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ func (mgr *syncManager) safeSubmitTask(task Task, callbacks ...func(error) error

func (mgr *syncManager) submit(key int64, task Task, callbacks ...func(error) error) *conc.Future[struct{}] {
handler := func(err error) error {
taskKey := fmt.Sprintf("%d-%d", task.SegmentID(), task.Checkpoint().GetTimestamp())
defer func() {
mgr.tasks.Remove(taskKey)
}()
if err == nil {
return nil
}
Expand Down

0 comments on commit 5fd69a0

Please sign in to comment.