-
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.
109337: asim: extract history, assertion into their own packages r=kvoli a=wenyihu6 **asim: extract history into its own package** Previously, the history struct (capturing store metrics at each tick and simulator’s current state) resided within the asim package. Another PR(#109316) is introducing assertion registration which enables scheduled assertion checks to run as delayed events. Since these assertion events use simulation’s history to conduct assertion checks, the event package would have to depend on the asim package. However, the asim package would also have to depend on the event package’s event executor for event ticking, creating a circular dependency. To address this issue, this patch moves the history component out of the asim package to its own package. Note that this commit does not change any existing behavior, and the main purpose is to make future commits cleaner. See also: #109316 Part of: #106192 Release note: none ---- **asim: extract assertions into its own package** Previously, simulation assertions resided within the tests package. Another PR(#109316) is introducing assertion registration which enables scheduled assertion checks to run as delayed events. Since these assertion events require the assertion structs to conduct assertion checks, the event package would have to depend on the test package. However, the test package would also have to depend on the event package’s exported struct to initialize structures for event generation, creating a circular dependency. To address this issue, this patch moves the assertion component out of the test package to its own package. Note that this commit does not change any existing behavior, and the main purpose is to make future commits cleaner. See also: #109316 Part of: #106192 Release note: none ---- **asim: refactor liveness parsing to be handled by scanArg** Previously, the test code directly parsed the string to derive a `livenessStatus`. To make this cleaner, this patch delegates string parsing and creation of `livenessStatus` to `scanArg`. Note that this commit does not change any existing behavior, and the main purpose is to make future commits cleaner. Epic: none Release note: none 109611: sql,schemachanger: disallow dropping indexes when referenced in UDF/View r=Xiang-Gu a=Xiang-Gu This PR disallows schema changes (in both legacy and declarative schema changers) that would drop indexes referenced explicitly via index hinting in UDF or view. They include `DROP INDEX`, `ADD COLUMN`, `DROP COLUMN`, and `ALTER PRIMARY KEY`. Fixes #108974 Epic: None Release note: None Co-authored-by: wenyihu6 <[email protected]> Co-authored-by: Xiang Gu <[email protected]>
- Loading branch information
Showing
28 changed files
with
426 additions
and
246 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "assertion", | ||
srcs = ["assert.go"], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/asim/assertion", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/kv/kvserver/asim/history", | ||
"//pkg/kv/kvserver/asim/metrics", | ||
"//pkg/roachpb", | ||
"//pkg/spanconfig/spanconfigtestutils", | ||
"//pkg/util/log", | ||
"@com_github_montanaflynn_stats//:stats", | ||
], | ||
) |
Oops, something went wrong.