You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(xmtp_mls): forward db-disconnect signal through SyncSummary and sibling error variants
A dropped DB pool (PoolNeedsConnection) surfacing during a sync was
misclassified as not-a-disconnect: SyncSummary had no NeedsDbReconnect impl, so
any disconnect landing in its publish/post-commit/other/per-message errors got
wrapped into GroupError::Sync / SyncFailedToWait / DeviceSyncError::Sync /
CommitLogError::SyncError and hit `_ => false`. The worker supervisor never
dropped the pool to reconnect — it retried forever on a dead pool
(GroupError::SyncFailedToWait is also is_retryable, a true hot-loop).
Fix — forward the signal everywhere it was dropped:
- SqlKeyStoreError gains db_needs_connection() (mirrors StorageError /
ConnectionError) so the OpenMLS key-store disconnect check lives in one place.
- SyncSummary: NeedsDbReconnect scans all four error sources, including the
per-message process.errored failures that is_retryable deliberately skips.
- GroupMessageProcessingError: NeedsDbReconnect forwards the directly-wrapped
DB variants and the OpenMLS state-I/O wrappers (process/merge), which carry a
drop as StorageError(SqlKeyStoreError::Connection(_)).
- GroupError: Sync / SyncFailedToWait / SqlKeyStore forwarded.
- TaskWorkerError: Group / LoadGroup / DeviceSync forward the full
classification instead of structurally matching only ::Storage.
- CommitLogError: SyncError / KeystoreError forwarded.
- DeviceSyncError: Sync forwarded.
Every new arm bottoms out at db_needs_connection(), which matches only
PoolNeedsConnection / Pool(_) — benign connection errors (e.g.
DisconnectInTransaction) stay false, pinned by negative test cases.
Rebased on main (post #3744 TaskRunner rework; tasks.rs merged with the new
LoadGroup variant). Adds 3 disconnect-propagation tests.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments