Skip to content

fix: write the last cursor on terminating regardless of err is nil or not#6

Open
fish-sammy wants to merge 1 commit intostreamingfast:developfrom
fish-sammy:fix/write-last-cursor
Open

fix: write the last cursor on terminating regardless of err is nil or not#6
fish-sammy wants to merge 1 commit intostreamingfast:developfrom
fish-sammy:fix/write-last-cursor

Conversation

@fish-sammy
Copy link
Contributor

No description provided.

@fish-sammy fish-sammy closed this Nov 24, 2025
@fish-sammy fish-sammy reopened this Nov 24, 2025
@fish-sammy fish-sammy force-pushed the fix/write-last-cursor branch from 405edeb to d33233c Compare November 24, 2025 17:41
Comment on lines +57 to +58
func (s *MongoSinker) writeLastCursor(ctx context.Context, _ error) {
if s.lastCursor == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is problematic to my eyes, what if the error make it such that the block wasn't fully written and then the cursor is saved? This would mean a block half-written and a cursor saved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can that happen with how HandleBlockScopedData is currently written?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants