Skip to content

Commit

Permalink
fix: Remove sync task after finished (#38681)
Browse files Browse the repository at this point in the history
Related to #38680

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

func (mgr *syncManager) submit(ctx context.Context, 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 636e107

Please sign in to comment.