Skip to content

Commit

Permalink
streamer: fix unstable Ci introduced in pingcap#1364 (pingcap#1421)
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 committed Feb 3, 2021
1 parent c82ba8c commit ddea396
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/streamer/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,21 +569,13 @@ func (r *BinlogReader) parseFile(

wg.Add(1)
go func(latestPos int64) {
defer func() {
close(switchCh)
close(switchErrCh)
wg.Done()
}()
defer wg.Done()
needSwitchSubDir(newCtx, r.cfg.RelayDir, currentUUID, fullPath, latestPos, switchCh, switchErrCh)
}(latestPos)

wg.Add(1)
go func(latestPos int64) {
defer func() {
close(updatePathCh)
close(updateErrCh)
wg.Done()
}()
defer wg.Done()
relaySubDirUpdated(newCtx, watcherInterval, relayLogDir, fullPath, relayLogFile, latestPos, updatePathCh, updateErrCh)
}(latestPos)

Expand Down

0 comments on commit ddea396

Please sign in to comment.