Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upbackport-2.1: cdc: Fix Sink Retries Again #31559
Conversation
mrtracy
requested a review
from
danhhz
Oct 17, 2018
mrtracy
requested a review
from cockroachdb/sql-ccl-prs
as a
code owner
Oct 17, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
mrtracy
requested a review
from cockroachdb/release
Oct 17, 2018
mrtracy
merged commit e479b7a
into
cockroachdb:release-2.1
Oct 17, 2018
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
mrtracy commentedOct 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.