You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE CHANGEFEED FOR <target> WITH <...>
Notably the `INTO <sink>` clause is omitted. This triggers a fairly
radical change in behavior. Instead of setting up a system.job to emit
to a sink in the background and returning immediately with the job ID,
the `CREATE CHANGEFEED` blocks forever and returns all changes as rows
directly over pgwire. The types of these rows are `(topic STRING, key
BYTES, value BYTES)` and they correspond exactly to what would be
emitted to a sink.
Because everything is funneled through the sql gateway and the client
connection dies if it dies, there's no reason to run this as a system
job. So we don't. This means the client is responsible for keeping track
of the latest resolved timestamp emitted and, on errors, reconnecting
with the `cursor=<timestamp>` option.
This also "happens" to be exactly the interface we need for most of the
unit tests, so switch them over to it. This allows the removal of the
timing based aspects of the tests, which should reduce some the flake
problems these tests have been having.
NB: The system still internally buffers results, so changes are not
returned immediately. Which means this is currently quite awkward and
surprising to use as a client of CockroachDB. The fix initially seems
like a decent amount of work so it'll wait for a followup PR. (The tests
work around it with a hack to set `ConnResultsBufferBytes` to a very
small value in the test servers.)
Closescockroachdb#26661Closescockroachdb#26682
Release note: None
The following tests appear to have failed:
#714262:
Please assign, take a look and update the issue accordingly.
The text was updated successfully, but these errors were encountered: