-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
changefeedccl: do rangefeed enabled check before starting job #41272
Conversation
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @aayushshah15)
pkg/storage/replica_rangefeed.go, line 131 at r1 (raw file):
args *roachpb.RangeFeedRequest, stream roachpb.Internal_RangeFeedServer, ) *roachpb.Error { if !RangefeedEnabled.Get(&r.store.cfg.Settings.SV) {
There's a sort of crazy edge case where a user upgrades rapidly and there's a rangefeed job which was created on 2.1 (19.1?). It's sort of a bummer because realistically as soon as you've been on 19.2 (or even 19.1?) for long enough for the job to fail it would be fine. That being said, I think you're right that we should return an error where you are.
@aayushshah15 want to try to rebase this and get it in? |
will do, thanks for digging this up again! |
f1ec382
to
a34f7a4
Compare
df97a21
to
6341740
Compare
Fixes cockroachdb#41213 If we currently start a changefeed without enabling the `kv.rangefeed.enabled` cluster setting, a job first gets started and then fails when it hits the setting check during the initial `Rangefeed` setup. This PR fixes this by performing this setting check in `changefeedPlanHook` in addition to the already existing check in `Replica.Rangefeed`. Release note: None
6341740
to
7dec9ad
Compare
This is RFAL. |
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.
Reviewed 3 of 3 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @aayushshah15)
TFTR! bors r=ajwerner |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
Fixes #41213
If we currently start a changefeed without enabling the
kv.rangefeed.enabled
cluster setting, a job first gets started andthen fails when it hits the setting check during the initial
Rangefeed
setup.
This PR fixes this by performing this setting check in
changefeedPlanHook
in addition to the already existing check inReplica.Rangefeed
.Release note:
CREATE CHANGEFEED
statements no longer result in asuperfluous changefeed job being created if rangefeeds are not enabled.