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.
sql: hydrate descriptors properly, use uncommitted, fix bug in alter …
…database As soon as cockroachdb#79580 merged, it tickled flakes. These flakes were caused by operations to alter the database which would build new mutable tables from immutable tables and thus overwrite existing entries. The fix here is to retrieve the proper descriptors using the collection, and to make sure that those descriptors are properly hydrated. This, in turn, revealed that our policy checking in validation to avoid using descriptors which had been already checked out was too severe and would cause excessive numbers of extra round-trip. I'll be honest, I haven't fully internalized why that policy was there. I supposed it was there to ensure that we didn't have a case where we check out a descriptor and then fail to write it to the store. I don't exactly know what to do to re-establish the desired behavior of the code. At the very least, it feels like if we did re-read the descriptor once, then we should do something about resetting the status. I guess I could try to unravel the mystery leading to the checkout in the first place. The test is very flakey without this patch. Release note: None
- Loading branch information
Showing
7 changed files
with
63 additions
and
24 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
12 changes: 6 additions & 6 deletions
12
pkg/ccl/benchccl/rttanalysisccl/testdata/benchmark_expectations
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
exp,benchmark | ||
17,AlterPrimaryRegion/alter_empty_database_alter_primary_region | ||
23,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region | ||
21,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region | ||
17,AlterPrimaryRegion/alter_populated_database_alter_primary_region | ||
24,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region | ||
17,AlterRegions/alter_empty_database_add_region | ||
14,AlterRegions/alter_empty_database_add_region | ||
17,AlterRegions/alter_empty_database_drop_region | ||
17,AlterRegions/alter_populated_database_add_region | ||
15,AlterRegions/alter_populated_database_add_region | ||
17,AlterRegions/alter_populated_database_drop_region | ||
17,AlterSurvivalGoals/alter_empty_database_from_region_to_zone | ||
18,AlterSurvivalGoals/alter_empty_database_from_zone_to_region | ||
16,AlterSurvivalGoals/alter_empty_database_from_zone_to_region | ||
37,AlterSurvivalGoals/alter_populated_database_from_region_to_zone | ||
38,AlterSurvivalGoals/alter_populated_database_from_zone_to_region | ||
15,AlterTableLocality/alter_from_global_to_rbr | ||
17,AlterTableLocality/alter_from_global_to_regional_by_table | ||
14,AlterTableLocality/alter_from_rbr_to_global | ||
14,AlterTableLocality/alter_from_rbr_to_regional_by_table | ||
12,AlterTableLocality/alter_from_rbr_to_global | ||
12,AlterTableLocality/alter_from_rbr_to_regional_by_table | ||
17,AlterTableLocality/alter_from_regional_by_table_to_global | ||
15,AlterTableLocality/alter_from_regional_by_table_to_rbr |
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