Skip to content

Commit

Permalink
*: reduce memory consumption by reducing channel sizes (#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzix authored Jun 10, 2021
1 parent 674a8e1 commit ef9f56e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cdc/kv/region_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var (
// other components in TiCDC, including worker pool task chan size, mounter
// chan size etc.
// TODO: unified channel buffer mechanism
regionWorkerInputChanSize = 12800
regionWorkerInputChanSize = 128
regionWorkerLowWatermark = int(float64(regionWorkerInputChanSize) * 0.2)
regionWorkerHighWatermark = int(float64(regionWorkerInputChanSize) * 0.7)
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/workerpool/pool_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ type worker struct {

func newWorker() *worker {
return &worker{
taskCh: make(chan *task, 128000),
taskCh: make(chan *task, 128),
handles: make(map[*defaultEventHandle]struct{}),
handleCancelCh: make(chan struct{}), // this channel must be unbuffered, i.e. blocking
}
Expand Down

0 comments on commit ef9f56e

Please sign in to comment.