Repository navigation
fix(core-sync): close waits for Team Library's store writes, and Keep Mine checks the policy before a kept password goes back - #4828
Merged
Conversation
… Mine takes the policy read before a kept password goes back
…e-and-keep-mine # Conflicts: # core/crates/sync/src/adapters/team_library.rs # core/crates/sync/src/service/mod.rs
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
TeamLibraryStore::in_flightis taken before a write goes to a blocking thread and moved into it, andTeamLibraryStore::settledwaits for them. Every write takes it: the engine'sstore_writeand the adapters'identity,applyandpulled_writers. Reads do not.ServiceSync::idle, which close calls, waits on it after the state file.Test plan
team_library::close::idle_waits_for_a_store_write_a_dropped_publish_left_running: on mainidlereturns while the write runs.adapters::team_library::every_adapter_write_counts_as_in_flight: each adapter write waits behind a close that waits for a running write.core_engine::team_secrets::keep_mine_on_a_server_the_policy_forbids_puts_no_kept_password_back: on main the kept password is back in the store after the refusal.core_engine::team_secrets::a_keep_mine_dropped_during_its_restore_holds_the_policy_read_until_the_password_is_back: without the read in the restore's write, the policy change lands first.storage team_library::tests::settled_waits_for_a_call_still_in_flight.-D warnings.