-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
73555: kvclient: fix bug in batches containing both get and rev scan requests r=nvanbenschoten,AlexTalks a=arulajmani This patch fixes a bug which could cause Get requests to be dropped when: - They were in the same batch as a ReverseScan request. - The key referenced in the Get request was to the left of the scan bounds - The key referenced in the Get request was on its own range. This was because of a bug in `prev()`, which the distsender uses to seek to the next range when scanning keys in reverse. A call to `prev()` informally means that all requests intersecting with keys `>=k` have already been executed. Here, we were incorrectly assuming that a point request for `x` had already been served and skipping over it -- but this isn't true when `x < k`. This patch ensures we no longer do that by treating [x] = [x, x.next()) and letting the existing logic take care of the rest. Fixes #73370 Release note: None 73676: cli/start: use the same format for server details in multi-tenant r=stevendanna a=knz cc @tbg who wanted this. This ensures that the server details are printed using the same format as regular nodes for multi-tenant SQL servers. Before: ``` SQL server for tenant 123 listening at 127.0.0.1:26258, http at 127.0.0.1:8081 ``` After: ``` CockroachDB SQL server starting at 2021-12-10 12:11:57.684183707 +0000 UTC (took 0.1s) build: CCL v21.2.0-alpha.00000000-6604-g6f243c67e2-dirty @ (go1.17.4) webui: http://kenax:8081 sql: postgresql://root@kenax:26258/defaultdb?sslmode=disable sql (JDBC): jdbc:postgresql://kenax:26258/defaultdb?sslmode=disable&user=root RPC client flags: ./cockroach <client cmd> --host=kenax:26258 --insecure temp dir: /data/home/kena/src/go/src/github.com/cockroachdb/cockroach/mt-data/cockroach-temp981776782 external I/O path: <disabled> store[0]: path=/data/home/kena/src/go/src/github.com/cockroachdb/cockroach/mt-data storage engine: pebble clusterID: 6622219f-89b7-4d0d-919f-22db8fa83dfd tenantID: 123 instanceID: 3 ``` Release note: None Co-authored-by: arulajmani <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
9 changed files
with
239 additions
and
102 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
Oops, something went wrong.