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.
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.
olake/drivers/mongodb/internal/cdc.go
Lines 80 to 85 in d6057d3
This issue was generated by todo-issue based on a
TODOcomment in d6057d3. It's been assigned to @vaibhav-datazip because they committed the code.