Android cross-process lock + notification-process path (§3.6) #87

Closed
opened 2026-08-12 12:03:37 +02:00 by thecrealm · 3 comments
Owner

M6 criterion 3: the §3.6 cross-process store lock and the notification-process read path, exercised on-device (AVD katrix-ci instrumented run like #42).

M6 criterion 3: the §3.6 cross-process store lock and the notification-process read path, exercised on-device (AVD katrix-ci instrumented run like #42).
Author
Owner

Review note (2026-08-13, fresh matrix-rust-sdk checkout): their cross-process lease lock now guards three stores (crypto, event cache, media — lease_locks_with_generation migrations in each) and gained lock GENERATIONS: a monotonic counter that lets a process detect its in-memory caches were dirtied by another holder while it lost the lease (matrix-sdk-common/src/cross_process_lock.rs). Worth adopting in the §3.6 design here. Also flagged by the review: D24:713 and D32:1131 cite the §3.6 lease lock as the standing multi-writer answer while no lock exists in code yet — this issue is that debt; until it lands, multi-process use has no real guard.

Review note (2026-08-13, fresh matrix-rust-sdk checkout): their cross-process lease lock now guards three stores (crypto, event cache, media — lease_locks_with_generation migrations in each) and gained lock GENERATIONS: a monotonic counter that lets a process detect its in-memory caches were dirtied by another holder while it lost the lease (matrix-sdk-common/src/cross_process_lock.rs). Worth adopting in the §3.6 design here. Also flagged by the review: D24:713 and D32:1131 cite the §3.6 lease lock as the standing multi-writer answer while no lock exists in code yet — this issue is that debt; until it lands, multi-process use has no real guard.
Author
Owner

Split 2026-08-21 (D57): #109 lease lock with generations (spec first: §12.1 entity + §10.7.4 detail), #110 single-room load, #111 crypto-only sync, #112 on-device two-process run (the criterion gate). Design: store-table lease with monotonic generation, CAS inside the store transaction, expiry for crashed holders. This issue stays as the umbrella.

Split 2026-08-21 (D57): #109 lease lock with generations (spec first: §12.1 entity + §10.7.4 detail), #110 single-room load, #111 crypto-only sync, #112 on-device two-process run (the criterion gate). Design: store-table lease with monotonic generation, CAS inside the store transaction, expiry for crashed holders. This issue stays as the umbrella.
Author
Owner

Umbrella split into #109 (lease lock, done), #110 (single-room load), #111 (crypto-only sync), #112 (on-device two-process run); design in D57. Tracking continues on the sub-issues.

Umbrella split into #109 (lease lock, done), #110 (single-room load), #111 (crypto-only sync), #112 (on-device two-process run); design in D57. Tracking continues on the sub-issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thecrealm/katrix#87
No description provided.