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

Seeker refactoring and simplifications #1668

Closed
richardartoul opened this issue May 25, 2019 · 1 comment
Closed

Seeker refactoring and simplifications #1668

richardartoul opened this issue May 25, 2019 · 1 comment
Labels
area:db All issues pertaining to dbnode P: Low T: Cleanup T: Refactor

Comments

@richardartoul
Copy link
Contributor

The seekers have a concept of a ConcurrentClone() which creates a low cost clone of a seeker so that the SeekerManager can maintain one per read concurrency. This was originally included in the design as the Seeker contained a lot of state that was not safe for concurrent access.

With recent improvements / refactorings to the Seekers there is very little state left in the seekers themselves. Its likely that the concept of a ConcurrentClone could be removed entirely which would simplify the codebase and be a little cleaner generally.

In addition, the Seeker has a concept of an unreadBuf that can be set by an external caller. With the recent introduction of ReusableSeekerResources there is no reason to maintain the unreadBuf and the unreadBuffer() and setUnreadBuffer() methods. Any reusable or shared buffer can simply be included in the ReusableSeekerResources() which is provided as an argument for all relevant function calls.

@robskillington
Copy link
Collaborator

robskillington commented May 26, 2019

+1 to all these changes (as long as we don't introduce per operation allocations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:db All issues pertaining to dbnode P: Low T: Cleanup T: Refactor
Projects
None yet
Development

No branches or pull requests

3 participants