Skip to content

Commit

Permalink
Merge pull request #100135 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-99867

release-23.1: backupccl: lower the buffer size of doneScatterCh in gen split and scatter
  • Loading branch information
Rui Hu authored Apr 6, 2023
2 parents 98cebec + d9e12ae commit 14cf13d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/ccl/backupccl/generative_split_and_scatter_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ func newGenerativeSplitAndScatterProcessor(
spec: spec,
chunkSplitAndScatterers: chunkSplitAndScatterers,
chunkEntrySplitAndScatterers: chunkEntrySplitAndScatterers,
// Large enough so that it never blocks.
doneScatterCh: make(chan entryNode, spec.NumEntries),
// There's not much science behind this sizing of doneScatterCh,
// other than it's the max number of entries that can be processed
// in parallel downstream. It has been verified ad-hoc that this
// sizing does not bottleneck restore.
doneScatterCh: make(chan entryNode, int(spec.NumNodes)*maxConcurrentRestoreWorkers),
routingDatumCache: make(map[roachpb.NodeID]rowenc.EncDatum),
}
if err := ssp.Init(ctx, ssp, post, generativeSplitAndScatterOutputTypes, flowCtx, processorID, nil, /* memMonitor */
Expand Down

0 comments on commit 14cf13d

Please sign in to comment.