Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stream IDs, proper storage prefixing, recovering from crashes. #177

Merged
merged 8 commits into from
Feb 16, 2020

Conversation

cube2222
Copy link
Owner

No description provided.

Copy link
Collaborator

@JasiekChomiak JasiekChomiak left a comment

Choose a reason for hiding this comment

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

I think it's high time we started commenting our code a bit more, because just by looking at the code, it is very difficult to understand what's happening in specific parts of the code. I think a two-liner saying "StreamID is ...." and "The transactions are now used in a way X instead of Y" would make reviewing a much more efficient, productive and easy job.


watermark, err := engine.watermarkSource.GetWatermark(ctx, sourcePrefixedTx)
watermark, err := engine.watermarkSource.GetWatermark(ctx, tx)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems like a very subtle change, yet there is nothing that explains it. Could you add a comment, as to explain why the watermark is suddenly created using the original transaction, and not the prefixed one, as was in the previous version?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I've added necessary comments.

if err != nil {
return errors.Wrap(err, "couldn't get current watermark from source")
}
if watermark.After(engine.lastCommittedWatermark) {
err := engine.irs.UpdateWatermark(ctx, tx, watermark)
err := engine.irs.UpdateWatermark(ctx, prefixedTx, watermark)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same thing here - these changes need commenting in my opinion

Copy link
Owner Author

Choose a reason for hiding this comment

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

I've added necessary comments.

@cube2222 cube2222 changed the base branch from group-by-tests to streaming February 15, 2020 12:13
@cube2222 cube2222 merged commit 4fcd990 into streaming Feb 16, 2020
@Qoziyev
Copy link

Qoziyev commented Sep 23, 2023

#329

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.

3 participants