-
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.
84306: asim: add load splits r=kvoli a=kvoli This patch adds load based splitting to the allocation simulator. It uses the production code path, `pkg/kv/kvserver/split`, to decide when and which key to split on. To enable split recommendations from this package, load events are recorded to the splitter and split suggestions enqueued into the simulator split queue. Split keys are likewise found via consulting the split decider first and when not found, the split queue wil instead split evenly (50/50) on the number of keys instead. resolves #82630 Release note: None 84451: dev,genbzl: add support for generating syntax diagrams r=ajwerner a=ajwerner Fixes #84443. Release note: None 84571: changefeedccl: prerequisite changes for `DROP COLUMN` r=ajwerner a=ajwerner This is the first two commits from #84563. They are needed to ensure that we don't change the behavior of `DROP COLUMN` when we support it in the declarative schema changer. The issue is that there the protocol is to create a new primary index and swap to it. The column becomes a non-public before the index swap, so the primary index swap is no longer a logical schema change of any kind. With this change, we can now detect that and properly restart as opposed to stop. Also, the newly added testing uncovers some badness in how we classify some other schema changes, and should generally be useful. Co-authored-by: Austen McClernon <[email protected]> Co-authored-by: Andrew Werner <[email protected]>
- Loading branch information
Showing
37 changed files
with
1,613 additions
and
160 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2022 The Cockroach Authors. | ||
// | ||
// Licensed as a CockroachDB Enterprise file under the Cockroach Community | ||
// License (the "License"); you may not use this file except in compliance with | ||
// the License. You may obtain a copy of the License at | ||
// | ||
// https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt | ||
|
||
package schemafeed | ||
|
||
import "strings" | ||
|
||
const TestingAllEventFilter = "testing" | ||
|
||
func init() { | ||
schemaChangeEventFilters[TestingAllEventFilter] = tableEventFilter{ | ||
tableEventDropColumn: false, | ||
tableEventAddColumnWithBackfill: false, | ||
tableEventAddColumnNoBackfill: false, | ||
tableEventUnknown: false, | ||
tableEventPrimaryKeyChange: false, | ||
tableEventLocalityRegionalByRowChange: false, | ||
tableEventAddHiddenColumn: false, | ||
} | ||
} | ||
|
||
var ClassifyEvent = classifyTableEvent | ||
|
||
func PrintTableEventType(t tableEventType) string { | ||
var strs []string | ||
for i := 0; i < 63; i++ { | ||
if t&1<<i != 0 { | ||
strs = append(strs, tableEventType(1<<i).String()) | ||
} | ||
} | ||
return strings.Join(strs, "|") | ||
} |
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.