-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
62071: geo: fix tests to pass under bazel r=rickystewart a=otan See individual commits for details. Resolves #61664 62255: colflow: fix premature stats collection and improve tracking r=yuzefovich a=yuzefovich This commit achieves two goals: 1. previously, we could call `finishVectorizedStatsCollectors` prematurely in some edge cases (e.g. when the right side of the hash join is empty, we could collect the stats from the left input tree too early). This was caused by the fact that we accumulate the vectorized stats collectors into a queue which is handled by the outboxes or the root materializer. This commit begins sharing the responsibility of the collecting stats with the hash router too. Only the hash router needs updating to achieve the fix because it is currently the only component that splits an input stream. The change is also sound because when the hash router exits, all stats collectors in its input tree should have the final info, and the hash router can collect correct stats. Those stats are added as another metadata object to be returned by the last to exit router output. 2. `vectorizedStatsCollectorsQueue` on the flow creator is removed in favor of more precise tracking of which stats collectors belong to which tree. The motivation behind this changes is that the follow-up commits will unify the retrieval of stats and draining of the metadata sources so that the former always occurred right before the latter. Also this commits renames `metadataSourcesQueue` to `metadataSources` and changes the order of arguments in a few functions. Fixes: #56928. Release note (bug fix): Previously, CockroachDB when collecting execution statistics (e.g. when running EXPLAIN ANALYZE) could collect them prematurely which would result in incorrect stats. This is now fixed. 62288: colbuilder: use correct processorID for wrapped filterers r=yuzefovich a=yuzefovich We forgot to use the correct processorID when planning wrapped filterers which resulted in stats from those processors to be always attributed to a processor with ID = 0. Release note: None (no stable release with this bug) 62293: sql: remove some remnants of the heuristics planner r=yuzefovich a=yuzefovich The heuristic planner has been long gone, but some remnants still remain. The most notable change is to `createTableNode` where we needed to synthesize a row ID column in the HP. I also searched for "heuristic pl" in the code base and found a few other mentions which are also removed. Two more are still present since they didn't seem as trivial. Release note: None Co-authored-by: Oliver Tan <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information
Showing
40 changed files
with
407 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2021 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package colexec | ||
|
||
import ( | ||
"github.com/cockroachdb/cockroach/pkg/sql/colexecop" | ||
"github.com/cockroachdb/cockroach/pkg/sql/execinfrapb" | ||
) | ||
|
||
// VectorizedStatsCollector is the common interface implemented by collectors. | ||
type VectorizedStatsCollector interface { | ||
colexecop.Operator | ||
GetStats() *execinfrapb.ComponentStats | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.