-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Shard diff transfer integration #3509
Conversation
676abba
to
038909f
Compare
038909f
to
4ebbd78
Compare
4ebbd78
to
53ecead
Compare
5196e64
to
6f34697
Compare
53ecead
to
ce3b355
Compare
6f34697
to
6ceffbd
Compare
ce3b355
to
3233c09
Compare
24223f5
to
001a456
Compare
001a456
to
73503b8
Compare
2c315a7
to
ea3caf3
Compare
ea3caf3
to
f3217ab
Compare
f3217ab
to
c7cac1c
Compare
484b335
to
ecb2d04
Compare
I'll merge this with WAL delta transfers disabled by default. I've confirmed this to work with 1.7 and 1.8 nodes in a single cluster. For now, a user could explicitly invoke a diff transfer by setting The plan is to make automatic WAL delta transfers happen in the 1.8 release, but there are some state problems to resolve. I'd prefer to merge this first so we have something to work with. Automatic WAL delta transfers will be worked on separately. |
* Add first stubs for WAL delta shard transfer method * Repurpose queue proxy, use it for transferring WAL diff as well * Integrate WAL delta transfer is transfer selection logic * Add WalDelta shard transfer type which is not exposed in public API * Basic implementation of falling back to stream records transfer * Share await_consensus_sync function * Ask remote shard for recovery point * During WAL delta transfer, resolve shard diff locally for recovery point * Rebase on latest dev, support empty WAL diff * Rebase on latest dev, support empty WAL diff * Use partial snapshot state for WAL delta transfer * Set cutoff point on remote shard after shard WAL delta transfer * Set cutoff point on remote shard after stream records transfer * During WAL delta transfer, set s tate from partial snapshot to partial * Describe WAL delta transfer in a comment * Allow updating cutoff point in stream records transfer to fail * Do not set cutoff point on remote shard on WAL delta transfer * Make await consensus sync logic easier to read and reason about * Fix fallback to other shard transfer method on WAL delta transfer fail * Various minor improvements * Add TODO for just ignoring API unimplemented errors * Only allow stream records cutoff point error if remote is older version * Allow switching to partial to fail when falling back * Only change shard state to partial if not in partial state already * Change default shard transfer method back to stream records * Add important TODO back * Add WAL delta shard transfer method in gRPC * Prefer configured shard transfer method as default * Extract shard transfer fallback logic into separate function
Tracked in: #3477
Depends on: #3551, #3571
This adds a new
WalDelta
shard transfer method to allow shard diff transfers. This variant remains unused for now and is hidden by default.It adds a
transfer_wal_delta
function to actually drive such transfer from a source node.The method currently utilizes a queue proxy shard because it already has all the necessary bits and bots implemented for transferring a WAL including all new incoming updates.
Tasks
We can set a
max_ack
version now, but this only limits the logical WAL. The physical WAL probably contains important data too which we should not truncate off while we still need it for transferring the diff.dev
dev
All Submissions:
dev
branch. Did you create your branch fromdev
?New Feature Submissions:
cargo +nightly fmt --all
command prior to submission?cargo clippy --all --all-features
command?