-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: audit operation names in new schema changer #88082
*: audit operation names in new schema changer #88082
Conversation
9c98469
to
ada4662
Compare
I like all of this, except 2.3. The choice of |
2a47c27
to
e6de1e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajwerner is it OK to change these running status messages? I think so but I ask just to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
andrew said to me offline that this is fine.
pkg/sql/schema_changer.go
Outdated
@@ -2760,7 +2760,7 @@ func (r schemaChangeResumer) OnFailOrCancel( | |||
} | |||
} | |||
|
|||
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this change should not be made
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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
TFTR! bors r+ |
Build succeeded: |
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
XxxGcXxx
toXxxGCXxx
;2.2. Rename field name in operations
DescID
toDescriptorID
;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_ONLY
toWRITE_ONLY
in some files underdocs/.
Fixes #84583
Release note: None