Repository navigation
fix(sync): a move without iCloud's last pass keeps the deletions iCloud sent, another provider ends a move, and the app closes sync - #4749
Merged
Conversation
…ns, another provider ends a move, and the app closes sync
…ns-and-close # Conflicts: # core/ARCHITECTURE.md # core/crates/sync/src/cloudkit/modify/pass.rs # core/crates/sync/src/cloudkit/modify/zone.rs # core/crates/sync/src/moves/mod.rs # core/crates/sync/src/state/file.rs # core/crates/sync/src/state/integrity/digest.rs # core/crates/sync/tests/state_integrity/upgrade.rs # core/docs/decisions/0016-tablepro-accounts.md # core/docs/decisions/0054-one-sync-engine-in-the-core-for-tablepro-sync-and-icloud.md # core/docs/decisions/README.md
…ence every arrival, read a restored file's deletions after its refill
…move from iCloud, done or not
…ns Off, settled once the service before lets go
…ith waits for that
…oad's iCloud file before a read opens it again
…ns-and-close # Conflicts: # core/crates/sync/src/state/integrity/upgrade.rs # core/docs/decisions/0054-one-sync-engine-in-the-core-for-tablepro-sync-and-icloud.md # core/docs/decisions/README.md
…ns-and-close # Conflicts: # core/ARCHITECTURE.md # core/crates/ffi/src/sync/open.rs # core/docs/decisions/README.md # windows/src/TablePro.Interop/Generated/tablepro_ffi.cs # windows/tests/TablePro.Interop.Tests/SyncTests.cs
…ns-and-close # Conflicts: # core/crates/account/src/account/mod.rs # core/docs/decisions/0016-tablepro-accounts.md # core/docs/decisions/README.md
…ns-and-close # Conflicts: # apple/TablePro/Resources/Localizable.xcstrings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zone_deletionstable (state file schema 3; schema 1 and 2 files upgrade at open), drops a row once the zone sends the record again, and the arrival reads the table when it has no zone listing. A restored file's rows count only once its refill read the zone.open_moveand every move call wait for it, so the end never lands on a move started since.ServiceSync::moving).SyncService::closestops the engines, ends their schedulers and the pass in flight, and refuses any new engine start; calls that are no pass, as Team Library's delete after a sign-out, still run. The iCloud engine lets go of its file at once, TablePro Sync's when the app lets go of the service. The Mac closes a service it lets go (sign-in change, provider change) and the open one at the quit; Windows closes it on dispose and frees it after.zone_deletionsis inADDED_AFTER_FORMAT_2, the oldest reader stays 2, and a file a format 2 build restamped clears the table again.core/ARCHITECTURE.mdpoint to it..claude/rules/data-sync-storage.mdnotes the close.Test plan
tablepro-accounta_bearer_asked_for_while_a_refresh_waits_on_a_silent_server_takes_its_answer(checked: with the rule off it fails with "the bearer called the server again").tablepro-syncengine moves:a_move_without_the_last_icloud_pass_takes_the_deletions_icloud_sent_the_device_before,a_forced_move_with_icloud_forbidden_takes_the_deletions_icloud_sent_the_device_before,a_provider_chosen_over_a_move_that_stopped_short_ends_it_and_icloud_syncs_the_file_again,off_over_a_finished_move_lets_icloud_sync_the_file_again_and_deletes_nothing_there,off_told_to_icloud_s_service_after_the_move_went_through_keeps_the_file_s_mark,off_chosen_while_a_resumed_move_reads_icloud_sends_nothing_up,a_move_begun_before_a_provider_choice_ended_the_moves_commits_nothing.tablepro-ffi:a_move_the_person_turned_sync_off_over_never_starts_again_by_itself,a_move_from_icloud_left_open_under_off_ends_as_sync_opens,a_finished_move_outlives_icloud_s_own_off_and_ends_as_sync_opens_off,a_first_upload_asked_for_before_sync_settled_waits_for_the_old_move_to_end,a_closed_service_ends_tablepro_sync_s_pass_in_flight_and_runs_none_after_it,a_closed_service_runs_no_pass_and_lets_go_of_its_state_files.a_move_reads_no_deletion_from_an_icloud_file_put_back_until_a_refill_read_the_zone,a_move_reads_the_deletions_an_icloud_file_put_back_received_after_its_refill,a_record_saved_again_in_the_zone_after_its_deletion_is_no_deletion_for_a_later_move, cloudkita_deletion_the_zone_sent_stays_until_the_zone_holds_the_record_again, state_integritya_schema_2_file_opens_fresh_in_this_schema_with_its_rowsanda_changed_schema_2_file_is_refusedoverfixtures/schema_2.txt, written by the schema 2 build (4feb33a).SyncEngineHostTests/aRetiredServiceCloses,SyncProviderCoordinatorTests/quitClosesTheOpenService,SyncProviderCoordinatorTests/aWriteOnTableProSyncOpensItsService.SyncTests.AClosedServiceRefusesTheCallsAfterIt(CI).cargo clippy --locked -p tablepro-account -p tablepro-sync -p tablepro-sync-testing -p tablepro-ffi --all-targets -- -D warningsclean; account 248, sync 1158, ffisync::83 passed. One merge earlier:verify.sh test SyncEngineHostTests SyncProviderCoordinatorTests ProviderMovesTests90/90, Windows bindings regenerated (PASS), InteropSyncTests8/8, Mac strings extracted (localization.py extractedok).