Skip to content

changefeedccl: cloudstorage sink file naming may not always be lexicographically ordered #155174

@andyyang890

Description

@andyyang890

Per #155015 (comment), the cloudstorage sink assumes that every time it's flushed, the changefeed's frontier timestamp has advanced. This isn't always true (e.g. when the feed is lagging and the lag checkpoint code path is hit:

checkpointSpans := (ca.frontier.InBackfill(resolved) || ca.frontier.HasLaggingSpans(sv)) &&
canCheckpointSpans(sv, ca.lastSpanFlush)
if checkpointSpans {
defer func() {
ca.lastSpanFlush = timeutil.Now()
}()
return ca.flushFrontier(ctx)
}
) and may have ramifications for making sure that new cloudstorage sink files have names that sort lexicographically after all previously written files.

Jira issue: CRDB-55306

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