Skip to content
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 not error out on checkpoint during pause-requested #83530

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

samiskin
Copy link
Contributor

@samiskin samiskin commented Jun 28, 2022

Resolves #83253

Previously there was a race condition where we could attempt to
checkpoint while the job was in a pause-requested state and would
error out. Since the changefeed should still be running normally
during *-requested states this should not error.

Release note (bug fix): Changefeeds no longer error out when attempting
to checkpoint during intermediate pause-requested or cancel-requested
states.

@samiskin samiskin requested a review from a team as a code owner June 28, 2022 19:28
@samiskin samiskin requested review from ajwerner and removed request for a team June 28, 2022 19:28
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@samiskin samiskin force-pushed the cdc-no-error-on-pause-request branch from 1bcab82 to bf73686 Compare June 28, 2022 19:31
@samiskin samiskin requested a review from miretskiy June 28, 2022 19:31
Resolves cockroachdb#83253

Previously there was a race condition where we would attempt to
checkpoint while the job was in a pause-requested state.  Since the
changefeed should still be running normally during requested states this
should not error.

Release note (bug fix): Changefeeds no longer error out when attempting
to checkpoint during intermediate pause-requested or cancel-requested
states.
@samiskin samiskin force-pushed the cdc-no-error-on-pause-request branch from bf73686 to 0707e55 Compare June 28, 2022 19:34
@samiskin
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 29, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 29, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jun 29, 2022

Build succeeded:

@craig craig bot merged commit 7072623 into cockroachdb:master Jun 29, 2022
miretskiy pushed a commit to miretskiy/cockroach that referenced this pull request Jul 8, 2022
Address multiple source of flakes in changefeed tests.

cockroachdb#83530 made a change
to ensure that changefeed do not fail when they are in the transient
(e.g. pause-requested) state.  Unfortunately, the PR made a mistake
where even if the checkpoint could not be completed because
the cangefeed is in the "pause requested" state, we would still
proceed to emit resolved event.  This is wrong, and the resolved
event should never be emitted if we failed to checkpoint.

In addition, alter changefeed can be used to add new tables to existing
changefeed, with initial scan.  In such cases, the newly added table
will emit events as of the timestamp of "alter changefeed statement".
When this happens, the semantics around resolved events are murky
as document in cockroachdb#84102
Address this issue by making cloud storage sink more permissive around
it's handling of resolved timestamp.

When completing initial scan for newly added tables, fix an "off by 1"
error when frontier was advanced to the next timestamp.
This was wrong since cockroachdb#82451
clarified that the rangefeed start time is exclusive.

Informs cockroachdb#83882
Fixes cockroachdb#83946

Release Notes: None
craig bot pushed a commit that referenced this pull request Jul 9, 2022
84109: changefeedcc: De-flake changefeed tests. r=miretskiy a=miretskiy

Address multiple source of flakes in changefeed tests.

#83530 made a change
to ensure that changefeed do not fail when they are in the transient
(e.g. pause-requested) state.  Unfortunately, the PR made a mistake
where even if the checkpoint could not be completed because
the cangefeed is in the "pause requested" state, we would still
proceed to emit resolved event.  This is wrong, and the resolved
event should never be emitted if we failed to checkpoint.

In addition, alter changefeed can be used to add new tables to existing
changefeed, with initial scan.  In such cases, the newly added table
will emit events as of the timestamp of "alter changefeed statement".
When this happens, the semantics around resolved events are murky
as documented in #84102
Address this issue by making cloud storage sink more permissive around
its handling of resolved timestamp.

When completing initial scan for newly added tables, fix an "off by 1"
error when frontier was advanced to the next timestamp.
This was wrong since #82451
clarified that the rangefeed start time is exclusive.

Informs #83882
Fixes #83946

Release Notes: None

Co-authored-by: Yevgeniy Miretskiy <[email protected]>
miretskiy pushed a commit to miretskiy/cockroach that referenced this pull request Jul 27, 2022
Address multiple source of flakes in changefeed tests.

cockroachdb#83530 made a change
to ensure that changefeed do not fail when they are in the transient
(e.g. pause-requested) state.  Unfortunately, the PR made a mistake
where even if the checkpoint could not be completed because
the cangefeed is in the "pause requested" state, we would still
proceed to emit resolved event.  This is wrong, and the resolved
event should never be emitted if we failed to checkpoint.

In addition, alter changefeed can be used to add new tables to existing
changefeed, with initial scan.  In such cases, the newly added table
will emit events as of the timestamp of "alter changefeed statement".
When this happens, the semantics around resolved events are murky
as document in cockroachdb#84102
Address this issue by making cloud storage sink more permissive around
it's handling of resolved timestamp.

When completing initial scan for newly added tables, fix an "off by 1"
error when frontier was advanced to the next timestamp.
This was wrong since cockroachdb#82451
clarified that the rangefeed start time is exclusive.

Informs cockroachdb#83882
Fixes cockroachdb#83946

Release Notes: None

Release note (<category, see below>): <what> <show> <why>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

changefeedccl: timeout in TestAlterChangefeedDatabaseQualifiedNames
4 participants