Skip to content

addition of all the state updations in metadata file even for blank sync scenario #881

@github-actions

Description

@github-actions

Currently there is an asymmetric handling of lsn or other pointers of cdc, because the metadata file is not generated when 0 records are getting synced. This might also help when there is loss of state.json file

metadata > state → crash-recovery path (metadata committed but state write failed). state >= metadata → read forward normally.


// TODO: addition of all the state updations in metadata file even for blank sync scenario
// metadata > state → crash-recovery path (metadata committed but state write failed).
// state >= metadata → read forward normally.
if typeutils.Compare(prevResumeToken, mtState) < 0 {
logger.Infof("Stream[%s] metadata ahead of state, using metadata resume token for recovery", stream.ID())
prevResumeToken = mtState


This issue was generated by todo-issue based on a TODO comment in d6057d3. It's been assigned to @vaibhav-datazip because they committed the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good second issueafter you have solved good first issueintermediateintermediate level issue for contributors with some understanding of the codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions