~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A group moved in is left out of its own spaces' writer sets

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

receive switches the group off, then writes its repo in each space with Asked { off: true }. space_commit lets that through, but tell_authority asks may, which refuses every write while the authority is switched off. So record_writer never runs for the group's own repo, and the refusal is only logged. The exported writers leave the group out on purpose (migration.rs:238), so nothing else puts it in. migrate_activate then only calls reindex, which walks the writer set, unlike importAccount, which calls tell_spaces after switching on (import.rs:568). After a move, listRepos gives syncers no repo for the group in any of its spaces, and the index has none of the group's records (profile, access records, roles, memberships). This lasts until the group next writes in each space, and for the meta space that can be a long time. tests/migration.rs:155 checks that carol is in the writer set but never checks the group.

How to see it

Read against docs/fresh at 4636e6d, the code at: migration.rs:550-553 and 609 (receive: switch off, then space_write_asked(.., off)), space.rs:61-64 (tell_authority → may), authority.rs:146-148, migration.rs:744-749 (migrate_activate). Paths are under crates/group-host/src unless they say otherwise. Severity: medium.

What you expected

Call tell_spaces(&group) in migrate_activate, as import does, so the group's repo in each space is told once it is on.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.