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

feat: Prevent passing invalid next_offset #73

Merged
merged 5 commits into from
Jun 7, 2022
Merged

feat: Prevent passing invalid next_offset #73

merged 5 commits into from
Jun 7, 2022

Conversation

lynnagara
Copy link
Member

The next_offset is used to seek and commit messages. It must always
be equal to the offset of the last processed message + 1. We shouldn't
allow any other value to be passed here.

This is a breaking change.

The next_offset is used to seek and commit messages. It must always
be equal to the offset of the last processed message + 1. We shouldn't
allow any other value to be passed here.

This is a breaking change.
@@ -27,6 +28,15 @@
from arroyo.utils.codecs import Codec


@dataclass(unsafe_hash=True)
Copy link
Member

Choose a reason for hiding this comment

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

I'm just curious, why unsafe_hash is used for these classes?

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied this over but I think it's needed otherwise the object won't be hashable.

@lynnagara lynnagara merged commit bfb73c8 into main Jun 7, 2022
@lynnagara lynnagara deleted the next-offset branch June 7, 2022 19:08
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.

None yet

2 participants