-
Notifications
You must be signed in to change notification settings - Fork 5
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
Expose Reader streamcut to read from given Stream Cut #22
Conversation
Signed-off-by: Shwetha N <[email protected]>
Signed-off-by: Shwetha N <[email protected]>
Signed-off-by: Shwetha N <[email protected]>
src/stream_reader_group.rs
Outdated
#[cfg(feature = "python_binding")] | ||
#[pyclass] | ||
#[derive(Clone)] | ||
pub(crate) struct ReaderStreamCut { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a confusing name. StreamCuts are for the whole stream and not specific to a reader. We can call this StreamCut and alias the StreamCut that is being imported to something else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tests/pravega_reader_test.py
Outdated
if count == 2 : | ||
break | ||
self.assertEqual(count, 2, "Two events are expected") | ||
time.sleep(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not depend on time, especially not in a hard coded way like this. Maybe we could have a #[cfg(test)]
method which forces the update
Signed-off-by: Shwetha N <[email protected]>
Signed-off-by: Shwetha N <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22 +/- ##
==========================================
- Coverage 86.02% 83.50% -2.52%
==========================================
Files 8 8
Lines 880 970 +90
==========================================
+ Hits 757 810 +53
- Misses 123 160 +37 ☔ View full report in Codecov by Sentry. |
Change log description
If Client application crashes and if user wants to continue read from the stream where it left off, currently, there is no method to obtain StreamCuts from the ReaderGroup.
StreamCuts are set of segment/offset pairs for a single stream that represent a consistent position in the stream.
Purpose of the change
Closes #23
What the code does
Exposed get_streamcut() API to return the Stream cut object.
How to verify it
All the testcase should pass