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

feat(split): scan support validate_partition_hash #702

Merged
merged 7 commits into from
Mar 31, 2021

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Mar 23, 2021

This pull request supports validate partition_hash while scan, including c++ client and server implementation.
when scan_context.validate_partition_hash = true and app env validate_partition_hash = true, each iterator of scan will check partition_hash to avoid return stale data after partition split. If request.validate_partition_hash is not set, scan_context.validate_partition_hash = true, it is compatibility for old client. Besides, only full_scan need validate hash, hash_scan will not return stale data.

The result of different client and server will like:

client server hash_scan validate full_scan validate
old splitting table true true
old not-splitting table false false
new splitting table false true
new not-splitting table false false

@hycdong hycdong added the component/split partition split label Mar 23, 2021
@acelyc111 acelyc111 merged commit 8e35518 into apache:master Mar 31, 2021
@hycdong hycdong deleted the scan_validate_hash branch March 31, 2021 07:17
zhangyifan27 pushed a commit to zhangyifan27/pegasus that referenced this pull request Jun 1, 2021
@hycdong hycdong mentioned this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/split partition split
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants