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

backport-2.1: cdc: Fix Sink Retries Again #31559

Merged
merged 1 commit into from Oct 17, 2018

Conversation

Projects
None yet
3 participants
@mrtracy
Contributor

mrtracy commented Oct 17, 2018

Backport 1/1 commits from #31410.

/cc @cockroachdb/release


Another small error made in the implementation of sink retries - in
order to provide a good UX for the CREATE CHANGEFEED statement, we want
to immediately service sink-related errors to the user when the
statement is executing. Once the changefeed job is created, however, we
retry (and log) errors from the sink. In the previous implementation,
this check was performed when the changefeed distsql processors were
instantiated; however, this occurs inside of the "Resume" method, which
can not easily tell if there is still a user statement waiting for
feedback. Therefore, we were not retrying on some errors that we should
have been retrying.

With this change, the "canary" sink used to detect these errors is moved
to the statement hook, which is only executed as part of the SQL
statement and not as part of the job's Resume loop, and therefore is not
subject to retries.

Release note: Fixed a bug where changefeeds may not correctly retry
temporary errors when communicating with a sink.

cdc: Fix Sink Retries Again
Another small error made in the implementation of sink retries - in
order to provide a good UX for the CREATE CHANGEFEED statement, we want
to immediately service sink-related errors to the user when the
statement is executing. Once the changefeed job is created, however, we
retry (and log) errors from the sink. In the previous implementation,
this check was performed when the changefeed distsql processors were
instantiated; however, this occurs inside of the "Resume" method, which
can not easily tell if there is still a user statement waiting for
feedback. Therefore, we were not retrying on some errors that we should
have been retrying.

With this change, the "canary" sink used to detect these errors is moved
to the statement hook, which is only executed as part of the SQL
statement and not as part of the job's Resume loop, and therefore is not
subject to retries.

Release note: Fixed a bug where changefeeds may not correctly retry
temporary errors when communicating with a sink.

@mrtracy mrtracy requested a review from danhhz Oct 17, 2018

@mrtracy mrtracy requested a review from cockroachdb/sql-ccl-prs as a code owner Oct 17, 2018

@cockroach-teamcity

This comment has been minimized.

Show comment
Hide comment
@cockroach-teamcity

cockroach-teamcity Oct 17, 2018

Member

This change is Reviewable

Member

cockroach-teamcity commented Oct 17, 2018

This change is Reviewable

@mrtracy mrtracy requested a review from cockroachdb/release Oct 17, 2018

@danhhz

danhhz approved these changes Oct 17, 2018

@mrtracy mrtracy merged commit e479b7a into cockroachdb:release-2.1 Oct 17, 2018

2 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
license/cla Contributor License Agreement is signed.
Details

@mrtracy mrtracy deleted the mrtracy:backport2.1-31410 branch Oct 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment