-
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.
logictest: add support for per-user nodeidx overrides
While we have support for switching users, which each hold a distinct db client handle, there was previously no way to set a specific node for the SQL client to connect to other than the default used for the entire test. With this change, we are now able to override the node used for the SQL client connection for a particular user with the following statement in a test: ``` user testuser nodeidx=3 ``` With this directive, subsequent statements will be made via a SQL connection to `NodeID` 4 (as `NodeID`s are 1-indexed), using user `testuser`. When a subsequent switch to the user is made that does not specify a nodeidx override, such as `user root`, subsequent statements will revert to using the default node for the test (typically `NodeID` 1). This enables support for testing Contention Events, where the node initiating the contending transaction needs to be validated, among other use cases. Note that the connections are per-user, so opening multiple connections to different nodes for a single user is not currently supported. Release note: None
- Loading branch information
Showing
2 changed files
with
28 additions
and
10 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