-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Eliminate deadlock in DebugStashFactory (#22117)
Previously, in the Drop impl of DebugStashFactory we were cleaning up the test schema created by the DebugStashFactory. In order to run the DROP command, we were blocking the async runtime, since the Drop impl can't be async. There were often other async tasks that had active CRDB transactions, especially when tests were run in parallel, that were now sitting idle because the runtime was blocked. The DROP SCHEMA command was waiting for these transactions to complete which caused a deadlock. CRDB eventually aborted active transactions after 5 minutes, but this was too long for tests that should take under a minute. A previous fix was to lower the idle transaction timeout to 1 second. This commit updates DebugStashFactory so that the CRDB state is cleaned up in an async function that must be called before dropping the DebugStashFactory. The solution no longer blocks the entire runtime, so we don't have to abort transactions from parallel tests. Works towards resolving #21891
- Loading branch information
Showing
12 changed files
with
1,222 additions
and
1,184 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.