fix(pull): a pulled team lands in its per-team store, not the shared one - #563
Merged
Conversation
A second machine starts with an empty local team, so bootstrap can select the per-team layout before importing any remote history. Recording that choice in the initial config keeps pull aligned with connect and prevents remote rows from entering the shared local-only store. Pin both the selected config and the absence of pulled rows in the shared database.
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.
Found while wiring
forget:_remote_write_pulled_teamnever wrotedrivers.layout, so pull-bootstrapped teams landed in the shareddb/messages.dbwhile connected teams live underdb/teams/<team>/. Verified live on the second dogfood machine — its pulled team sits in the shared store with nodb/teams/at all.Machine B arrives empty, so no external direct-DB reader can depend on a pulled team being in the shared store — the compatibility argument that keeps unconnected teams shared does not apply. Writing
layout=per-teambefore bootstrap restores the invariant that every remote-bound team lives in its own store, which is also whatforget(#562) relies on to delete exactly one team's data.No migration for already-pulled teams: the only installs in that state are our own dogfood ones, which will be refreshed with forget + re-pull once #562 lands.
Regression pins: config selection,
db/teams/<team>/messages.dbexists, zero rows for the team in the shared store — and drops without the production line.PR opened on the author's behalf — their sandbox blocks GitHub access.