Skip to content

Commit

Permalink
Merge #93421 #93953
Browse files Browse the repository at this point in the history
93421: multitenant: improve admin function RELOCATE {NON_}VOTING test cases r=knz a=ecwall

Fixes #93420
    
Address the TODO comments on these test cases fix the invalid test setup.
    
Release note: None

93953: colflow: fix stale comments r=yuzefovich a=yuzefovich

This commit updates the comments that have become stale as of 661296f.

Epic: None

Release note: None

Co-authored-by: Evan Wall <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
  • Loading branch information
3 people committed Dec 20, 2022
3 parents b80d44d + 6297920 + 500a888 commit 9890516
Show file tree
Hide file tree
Showing 4 changed files with 674 additions and 139 deletions.
27 changes: 11 additions & 16 deletions pkg/sql/colflow/vectorized_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,10 @@ func (s *vectorizedFlowCreator) Release() {
vectorizedFlowCreatorPool.Put(s)
}

// setupRemoteOutputStream sets up an Outbox that will operate according to
// the given StreamEndpointSpec. It will also drain all MetadataSources in the
// metadataSources.
// NOTE: The caller must not reuse the metadataSources and toClose.
// setupRemoteOutputStream sets up a colrpc.Outbox that will operate according
// to the given execinfrapb.StreamEndpointSpec. It will also drain all
// MetadataSources in op.
// NOTE: The caller must not reuse the metadata sources.
func (s *vectorizedFlowCreator) setupRemoteOutputStream(
ctx context.Context,
flowCtx *execinfra.FlowCtx,
Expand Down Expand Up @@ -765,14 +765,11 @@ func (s *vectorizedFlowCreator) setupRemoteOutputStream(
}

// setupRouter sets up a vectorized hash router according to the output router
// spec. If the outputs are local, these are added to s.streamIDToInputOp to be
// used as inputs in further planning. metadataSources is passed along to any
// outboxes created to be drained, or stored in streamIDToInputOp for any local
// outputs to pass that responsibility along. In any case, metadataSources will
// always be fully consumed.
// spec. The router takes the responsibility of draining the metadata sources
// from input.MetadataSources.
// NOTE: This method supports only BY_HASH routers. Callers should handle
// PASS_THROUGH routers separately.
// NOTE: The caller must not reuse the metadataSources and toClose.
// NOTE: The caller must not reuse the metadata sources.
func (s *vectorizedFlowCreator) setupRouter(
ctx context.Context,
flowCtx *execinfra.FlowCtx,
Expand Down Expand Up @@ -821,8 +818,6 @@ func (s *vectorizedFlowCreator) setupRouter(
case execinfrapb.StreamEndpointSpec_SYNC_RESPONSE:
return errors.Errorf("unexpected sync response output when setting up router")
case execinfrapb.StreamEndpointSpec_REMOTE:
// Note that here we pass in nil 'toClose' slice because hash
// router is responsible for closing all of the idempotent closers.
if _, err := s.setupRemoteOutputStream(
ctx, flowCtx, colexecargs.OpWithMetaInfo{
Root: op,
Expand Down Expand Up @@ -1004,10 +999,10 @@ func (s *vectorizedFlowCreator) setupInput(
}

// setupOutput sets up any necessary infrastructure according to the output spec
// of pspec. The metadataSources and toClose slices are fully consumed by either
// passing them to an outbox or HashRouter to be drained/closed, or storing them
// in streamIDToInputOp with the given op to be processed later.
// NOTE: The caller must not reuse the metadataSources and toClose.
// of pspec. The metadata sources are fully consumed by either passing them to
// an outbox or HashRouter to be drained, or storing them in streamIDToInputOp
// with the given op to be processed later.
// NOTE: The caller must not reuse the metadata sources.
func (s *vectorizedFlowCreator) setupOutput(
ctx context.Context,
flowCtx *execinfra.FlowCtx,
Expand Down
Loading

0 comments on commit 9890516

Please sign in to comment.