forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
77609: lease: Remove descriptors from cache if not found during lease refresh r=Xiang-Gu a=Xiang-Gu Previously, when a descriptor is not found, we just log it and move on. This is inadequate because the no-longer-exist descriptor still exists in cache (i.e. in-memory objects managed by `lease.Manager`). To address this, this PR added logic that removes the descriptor when this situation occurred. Fixes cockroachdb#67364 Release note: None 80806: sql: do not drop physical shard column if not cascade. r=Xiang-Gu a=Xiang-Gu Release note (sql change): Previously, when we drop a hash-sharded index, we will also drop the accompanying shard column, if no other index uses this shard column. For hash-sharded index created in 21.2 and prior, this shard column is a physical, `STORED` column. Dropping such a physical column can be very expensive since it requires a full table rewrite. For hash-sharded index craeted in 22.1 and later, this shard column is a virtual, computed column and dropping a virtual column is no problem. This PR introduces the sql change that, if the to-be-dropped sharded index has a physical shard column (and no other index uses that column), we will drop only the index if not CASCADE; we will drop both the index and the column if CASCADE. Fixed: cockroachdb#80181 Co-authored-by: Xiang Gu <xiang@cockroachlabs.com>
- Loading branch information
Showing
7 changed files
with
219 additions
and
11 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
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