-
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.
96989: roachtest: improvements to `mixedversion` package r=herkolategan a=renatolabs This commit introduces a few improvements to the `mixedversion` package, the recently introduced framework for mixed-version (and mixed-binary) roachtests. Specifically, the following improvements are made: * Removal of `DBNode()` function: having the planner pick a database that the individual steps will connect to is insufficient in many cases and could be misleading. The idea was that the user would be able to see, from the test plan itself, what node a certain step would be interacting with. However, the reality is that steps often need to run statements on multiple different nodes, or perhaps they need to pick one node specifically (e.g., the statement needs to run on a node in the old version). For that reason, the `DBNode()` function was dropped. Instead, steps have access to a random number generator that they can use to pick an arbitrary node themselves. The random number generators are unique to each user function, meaning each test run will see the same numbers being generated even if other steps are scheduled concurrently. The numbers observed by a user function will also be the same if the seed passed to `mixedversion.Test` is the same. * Definition of a "test context" that is available to mixed-version tests. For now, the test context includes things like which version we are upgrading (or downgrading) to and from and which nodes are running which version. This allows tests to take actions based on, for example, the number of nodes upgraded. It also allows them to run certain operations on nodes that are known to be in a specific version. * Introduction of a `helper` struct that is passed to user-functions. For now, the helper includes functions to connect to a specific node and get the current test context. The struct will help us provide common functionality to tests so that they don't have to duplicate code. * Log cached binary and cluster versions before executing a step. This makes it easier to understand the state of the cluster when looking at the logs of one specific step. * Internal improvement to the test runner: instead of assuming the first step of a mixed-version test plan will start the the cockroach nodes, we now check that that is the case, providing a clear error message if/when that assumption doesn't hold anymore (instead of a cryptic connection failure error). Epic: CRDB-19321 Release note: None 97251: sql: add user_id column to system.database_role_settings table r=rafiss a=andyyang890 This patch adds a new `role_id` column to the `system.database_role_settings` table, which corresponds to the existing `role_name` column. Migrations are also added to alter and backfill the table in older clusters. Part of #87079 Release note: None 97566: kvserver: assert uniqueness in registerProposalLocked r=pavelkalinnikov a=tbg We routinely overwrite entries in the `r.mu.proposals` map. That is "fine" (better if we didn't, but currently it is by design - it happens in refreshProposalsLocked and during tryReproposeWithNewLeaseIndex) but our overwrites should be no-ops, i.e. reference the exact same `*ProposalData`. This is now asserted. One way this would trip is a CmdID collision. Epic: none Release note: None 97606: kvserver: disable assertion 'finished proposal inserted' r=pavelkalinnikov a=tbg Touches #97605. Epic: none Release note: None Co-authored-by: Renato Costa <[email protected]> Co-authored-by: Andy Yang <[email protected]> Co-authored-by: Tobias Grieger <[email protected]>
- Loading branch information
Showing
21 changed files
with
546 additions
and
130 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
Oops, something went wrong.