-
Notifications
You must be signed in to change notification settings - Fork 741
Introduce new fullsync protocol, which takes snapshot only once per synchronization #19444
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
Introduce new fullsync protocol, which takes snapshot only once per synchronization #19444
Conversation
|
🟢 |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
| TIntrusivePtr<TBarriersSnapshot::TBarriersEssence> BarriersEssence; | ||
| }; | ||
|
|
||
| class TFrequentlyCalledHPTimer { |
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.
How about moving it to common code?
| // now, when we obtained DbBirthLsn, we can create full sync handler actor | ||
| // run handler in the same mailbox | ||
| if (DbBirthLsn) { | ||
| Db->SyncFullHandlerID.Set(ctx.RegisterWithSameMailbox(CreateHullSyncFullHandler(Db, HullCtx, |
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.
What happens if there is no DbBirthLsn at the time?
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.
It only happens if VDisk is donor, but in that case we can't start syncing with this VDisk
| break; | ||
| default: | ||
| // unknown protocol, report incompatibility and die | ||
| RespondWithErroneousStatus(ev, {}, NKikimrProto::BLOCKED); |
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.
Why BLOCKED?
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 just used it as previously unused erroneous status, but I guess you right, it's not semantically appropriate to use BLOCKED here
| // Recipient demanded fullsync restart, kill existing actor | ||
| TActorId actorId = it1->second; | ||
| Send(actorId, new TEvents::TEvPoisonPill); | ||
| auto it2 = UnorderedDataFullSyncSessionLookup.find(actorId); |
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.
You can just call erase with a key and check return value to ensure item was actually deleted.
|
|
||
| void Handle(const TEvVGenerationChange::TPtr& ev) { | ||
| SelfVDiskId = ev->Get()->NewVDiskId; | ||
| // We must restart all fullsync sessions when VDisk generation changes |
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.
Do we really need to restart them? I'd suppose to identify clients by order number and incarnation guid and restart only when that guid changes. Make sessions more consistent.
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.
When generation changes it restarts on client side anyways
https://github.com/ydb-platform/ydb/blob/main/ydb/core/blobstorage/vdisk/syncer/syncer_job_task.cpp#L267
| UnorderedDataFullSyncSessionLookup.erase(it2); | ||
| return actorId; | ||
| } | ||
| return TActorId{}; |
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.
Why optional<TActorId> then?
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
Introduce new UnorderedData protocol of full synchronization which allows to take hull index snapshot only once per full sync session. New protocol will be used to send DoNotKeep flags from Phantom Flag Storage, which will be sent without relying on linear order. For now the new protocol is disabled by default.
Changelog category