-
Notifications
You must be signed in to change notification settings - Fork 7
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
KeyStreamerAt #7
Conversation
Pull Request Test Coverage Report for Build 1241102608
💛 - Coveralls |
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.
Thanks for the contribution, there are a few changes I'm requesting, feel free to reach out if they aren't clear enough.
Hey, did the requested changes! |
actually, after having thought about it a bit more, I believe we should internally only rely on the streamAt interface. KeyReaderAt and RegisterAdapter should be marked as deprecated and fall back to wrapping the provided KeyReaderAt as a KeyStreamerAt. Makes sense? |
Yes, this is what I originally thought as well. But it means the original external API needs to be modified? |
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've tried to clarify through these comments. The suggested changes do not modify the existing API, and transparently handles the case when the given reader only implements KeyReaderAt
hmm, the handler.ReadAt methods can't be removed actually to maintain KeyReaderAt interface. They can just panic as they will never be used |
Made the changes and deprecated all KeyReaderAt methods. |
The PR concerns the following changes:
KeyStreamerAt
interface to stream blocks instead of fetching them usingKeyReaderAt
. This has the benefits of reducing lock contention and allocation of large byte buffers.KeyStreamerAt
and the original APIKeyReaderAt
using a wrapper.