-
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.
32733: kv, sql: replace TestTraceFromErrorReplica r=andreimatei a=andreimatei That test was teminally confused and confusing. It was written to prevent a regression from a time where the DistSender used to have a bug causing it to not ingest snowball trace info for errors for which it performed retries (e.g. NotLeaseHolderError). That bug was repaired by pushing the ingesting logic from the DistSender down to the gRPC transport. The test I wrote at the time was written at a very high level - using the SQL interface. If you look at it with generousity it might have seemed like a good idea at the time, but particuarly with the advent of DistSQL, the test became way confused. It worked by using ManualReplication (which meant that, consciensiously or not, the test was getting a single range). It then created a table and controlled its leaseholder, and then traced a select from a node that was not aware of this leaseholder, and asserted it was seeing a NLHE in the trace. The intent was from the error to come from a Scan. However, at least since DistSQL happened, the error was coming from the planning process (creating the physical plan), from a range resolving operation (because the node doing the select became unaware of the leases for the meta ranges too incidentally), not from a TableReader. Although arguably the test was still proving what it wanted to prove, it was confusing af. Also, the test is starting to hopelessly break with a different thing I have in the works where clusters get more than one system range even when used with ManualReplication. The patch replaces the test with a unit test for the gRPC transport. Release note: None Co-authored-by: Andrei Matei <[email protected]>
- Loading branch information
Showing
2 changed files
with
75 additions
and
59 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