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

chore: at-least-once need not be scary #11

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/streamstore/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ class S2:
enable_append_retries: Enable retries for appends i.e for both :meth:`.Stream.append` and
:meth:`.Stream.append_session`. Default value is True.
cloud: Cloud in which the S2 service runs. Currently, only AWS is supported.

Caution:
Copy link
Member

Choose a reason for hiding this comment

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

maybe Note: then?

Copy link
Member Author

@shikhar shikhar Jan 15, 2025

Choose a reason for hiding this comment

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

I think it's a larger discussion than a note -- but in general, duplicate records due to at-least-once semantics are a well-accepted default. We offer a way to mitigate in case there is known to be a single writer (match-seq-num, and if that fails client can re-verify contents of the stream).

Enabling retries for appends could lead to duplicate records in the stream. There can be
cases where such a behavior is undesirable. You can disable it if you have such a case.
"""

__slots__ = (
Expand Down