-
Notifications
You must be signed in to change notification settings - Fork 17
CXXCBC-345: Range scan improvements & resolve concurrency issues #525
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
Matt-Woz
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 but maybe want another pair of eyes to confirm - also verified with PHP and it seems to have solved the previous issues w/concurrency
thejcfactor
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.
Apart from my 1 comment, FIT looks good w/ the Python and Node.js performers. I can consistently get all tests to pass (wasn't the case previously). I will look more closely at the changes tomorrow if @avsej cannot get to them first. 👍
4928429 to
01798b3
Compare
avsej
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.
Looks good in general, couple of style notes
01798b3 to
b52596b
Compare
…chbase#525) * CXXCBC-345: Range scan improvements & resolve concurrency issues * For sampling scans use the same seed for shuffling vbuckets in the load balancer --------- Co-authored-by: Sergey Avseyev <[email protected]>
Motivation
A number of issues were observed with the existing range scan implementation, such as items missing & the scan getting stuck indefinitely when more than one IO threads are used in the SDK. This change simplifies the implementation of range scan and resolves issues with concurrency and IO threads.
Changes
range_scan_load_balancerclass to contain all of the logic around selecting which vbucket to scan.next_item(). Items are sent through this channel, as well as signals that a vbucket scan has been completed (either successfully or with a fatal error), which allows the orchestrator to keep track of whether there are any outstanding vbucket scans.asio::postwhen triggering KV operations within a KV callback (e.g. when doing arange_scan_continuefrom the callback ofrange_scan_create)Results
All tests pass, including FIT