-
Notifications
You must be signed in to change notification settings - Fork 13
ch9628: streamset earliest/latest fix #83
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
Conversation
|
The DS team brought it to my attention that I took a look and the issue was that I wasn't exactly sure what to return in |
btrdb/stream.py
Outdated
|
|
||
| self._pinned_versions = self._latest_versions() if not versions else versions | ||
| return self | ||
| return self._pinned_versions |
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 breaks the concept of method chaining. Streamset methods like this should always return self.
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.
I need to adjust my brain to think about the problem you are running into... will return with comments but I dont think this is the correct fix in this case.
btrdb/stream.py
Outdated
| """ | ||
| return self._pinned_versions if self._pinned_versions else self._latest_versions() | ||
| return self._pinned_versions if self._pinned_versions else self.pin_versions() |
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.
Related to above.
|
@looselycoupled I took another look at this after our conversation last week, and I believe that the approach that you mentioned during our call is the best fix - in the Let me know if you think I'm missing something. I tested it out and the earliest/latest calls are down to ~30 seconds for a StreamSet with 183 streams |
looselycoupled
left a comment
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.
LGTM
No description provided.