*: audit operation names in new schema changer#88082
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Sep 22, 2022
Merged
*: audit operation names in new schema changer#88082craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
9c98469 to
ada4662
Compare
|
I like all of this, except 2.3. The choice of |
2a47c27 to
e6de1e4
Compare
postamar
approved these changes
Sep 21, 2022
postamar
left a comment
There was a problem hiding this comment.
LGTM, thanks for doing this, assuming that changing the running status text is OK.
| // DELETE_AND_WRITE_ONLY state. | ||
| RunningStatusDeleteAndWriteOnly jobs.RunningStatus = "waiting in DELETE-AND-WRITE_ONLY" | ||
| // WRITE_ONLY state. | ||
| RunningStatusWriteOnly jobs.RunningStatus = "waiting in WRITE_ONLY" |
There was a problem hiding this comment.
@ajwerner is it OK to change these running status messages? I think so but I ask just to be sure.
Contributor
Author
There was a problem hiding this comment.
andrew said to me offline that this is fine.
pkg/sql/schema_changer.go
Outdated
| } | ||
|
|
||
| // If this is a schema change to drop a database or schema, DescID will be | ||
| // If this is a schema change to drop a database or schema, DescriptorID will be |
e6de1e4 to
2740201
Compare
This PR made non-functional changes related to new schema changer ops: 1. Rename all status changing operation on Index and Column to comform to the pattern: `Make[StatusA][Index/Column][StatusB]` 2. Rename a few constant/field/function names to be consistent with the principle of "being explicit": 2.1. Rename operation name `XxxGcXxx` to `XxxGCXxx`; 2.2. Rename field name in operations `DescID` to `DescriptorID`; 2.3. Rename descpb.DELETE_AND_WRITE_ONLY to descpb.WRITE_ONLY; 2.4. Rename sql.RunningStatusDeleteAndWriteOnly to sql.RunningStatusWriteOnly 3. Seveal comments enhencement 4. Rename `DELETE_AND_WRITE_ONLY` to `WRITE_ONLY` in some files under docs/. Release note: None
2740201 to
b31d532
Compare
Contributor
Author
|
TFTR! bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR made non-functional changes related to new schema changer ops:
Rename all status changing operation on Index and Column to comform
to the pattern:
Make[StatusA][Index/Column][StatusB]Rename a few constant/field/function names to be consistent with the
principle of "being explicit":
2.1. Rename operation name
XxxGcXxxtoXxxGCXxx;2.2. Rename field name in operations
DescIDtoDescriptorID;2.3. Rename descpb.DELETE_AND_WRITE_ONLY to descpb.WRITE_ONLY;
2.4. Rename sql.RunningStatusDeleteAndWriteOnly to sql.RunningStatusWriteOnly
Seveal comments enhencement
Rename
DELETE_AND_WRITE_ONLYtoWRITE_ONLYin some files underdocs/.
Fixes #84583
Release note: None