-
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.
catalog/lease: fix test flake in schema_repair
Previously, the schema_repair test would delete a descriptor forcefully and re-inject it with the same version. When using unsafe repair functions, there is no lease based waits to confirm if the deletion is completed inside the system.lease table. This test would not flake in the past because the expiry based model allowed both the deleted and re-added descriptors to have rows for the same version of the descriptor. With the session based model are more strict and only allow one row per descriptor version on a node. As a result its crucical that in such repair operations either the version is bumped or we wait for the lease manager to clean up the old descriptor from storage. To address this, this patch adds a safety inside unsafe_upsert_descriptor to wait for any leases to expire if a descriptor is being added back again (only if the force option is not used). This ensures that transactions running after this point only use the new version. Fixes: #120445 Release note: None
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 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