Skip to content

changefeedcc: Alter changefeed w/ Resolved has murky semantics. #84102

@miretskiy

Description

@miretskiy

Alter changefeed to add new table with initial scan has murky
"resolved" semantics.

Consider the case when existing changefeed, running with resolved option,
is paused , and has the checkpoint as of time T
(and thus resolved event has been emitted at time T).

We then subsequently alter the feed, and add a new table with initial scan.
All previous tables will not be scanned; but the new table will be scanned
as of time T. This means that we will be emitting events with timestamp
set to T -- which seem to violate (or at least make murky) semantics
around previously emitted resolved event. That is: we have promised that all
events up to and including T have been emitted, and yet, we are emitting
more events with timestamp T.

This might not be a violation per se -- but it is confusing.
We should do 2 things:

  • Emit warning when altering changefeed with resolved option when adding new tables with initial scan
  • Consider updating docs to clarify these semantics.

Jira issue: CRDB-17461

Epic CRDB-14988

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cdcChange Data CaptureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-cdc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions