forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
132678: schemachanger: disable dsc zone config by default r=rafiss a=annrpom This patch disables zone config statements in the declarative schema changer by default. Release note: None Epic: None 132701: opt: prevent stack overflow when deriving computed column filters r=mgartner a=mgartner #### opt: add max-stack opttest option This commit adds the `max-stack` option for opttests, allowing tests to alter the maximum stack size for the goroutine that optimizes the query. Release note: None #### opt: prevent stack overflow when deriving computed column filters Previously, a filter of the form `col IN (elem0, elem1, ..., elemN)` could result in a stack overflow in the optimizer when `N` is very large, e.g., 1.6 million or more . The problem would occur when trying to derive constraints for indexes on computed column, specifically when those computed columns are dependent on the column in the filter, e.g., `col` in the example. The current implementation builds an `OrExpr` tree with depth equal to the length of the `IN` list. It then constructs a `FiltersItem` with the `OrExpr` tree as the condition, causing logical properties to be built for the expression. When building logical properties, the `OrExpr` tree is traversed recursively, which causes the stack to overflow when the tree is very deep. Now, an `OrExpr` tree is never built. Instead, `CombineComputedColFilters` returns a slice of `ScalarExpr`s that represents a disjunction of expressions. This effectively eliminates the possibility of stack overflows in code that recursively traverses the derived expressions. It also simplified the logic. Fixes cockroachdb#132669 Release note (bug fix): A bug in the query optimizer which could cause CockroachDB nodes to crash in rare cases has been fixed. The bug could occur when a query contains a filter in the form `col IN (elem0, elem1, ..., elemN)` only when `N` is very large, e.g., 1.6+ million, and when `col` exists in a hash-sharded index or exists a table with an indexed, computed column dependent on `col`. 132849: go.mod: bump Pebble to c6b097e7e6a0 r=dt a=jbowens Changes: * [`c6b097e7`](cockroachdb/pebble@c6b097e7) sstable: add jemalloc size classes to tests * [`b07f0b23`](cockroachdb/pebble@b07f0b23) db: fix Options.Parse handling of unrecognized comparer * [`9f164613`](cockroachdb/pebble@9f164613) db: fix a few instances of the wrong table format * [`dd26bf0e`](cockroachdb/pebble@dd26bf0e) db: delete compactions output in case of late cancellation * [`1ed55247`](cockroachdb/pebble@1ed55247) block: rewrite block flush logic * [`887598ae`](cockroachdb/pebble@887598ae) sstable: set w.indexBlockSize in colBlkWriter * [`030afd26`](cockroachdb/pebble@030afd26) colblk: use UnsafeOffsets.At2 in another instance * [`b3993ff6`](cockroachdb/pebble@b3993ff6) db: persist Experimental.EnableColumnarBlocks in OPTIONS file * [`c719c4e5`](cockroachdb/pebble@c719c4e5) db: support multiple KeySchemas Release note: none. Epic: none. Co-authored-by: Annie Pompa <[email protected]> Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Jackson Owens <[email protected]>
- Loading branch information
Showing
14 changed files
with
120 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1818,10 +1818,10 @@ def go_deps(): | |
patches = [ | ||
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch", | ||
], | ||
sha256 = "c18276fb68bfeff93edfbc563ed2f07d4956e2627ba9461d26830720ed3e03d7", | ||
strip_prefix = "github.com/cockroachdb/[email protected]20241016162652-8b6d64f23a33", | ||
sha256 = "7136fa698f76055d99e3cf1055026d3fc00fc0cd6c65f7c27ef202ca769ea10f", | ||
strip_prefix = "github.com/cockroachdb/[email protected]20241017141447-c6b097e7e6a0", | ||
urls = [ | ||
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241016162652-8b6d64f23a33.zip", | ||
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241017141447-c6b097e7e6a0.zip", | ||
], | ||
) | ||
go_repository( | ||
|
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