Skip to content

[stable32] fix(user_status): stabilise the user_status - #61618

Merged
AndyScherzinger merged 4 commits into
stable32from
backport/59535/stable32
Jul 15, 2026
Merged

[stable32] fix(user_status): stabilise the user_status#61618
AndyScherzinger merged 4 commits into
stable32from
backport/59535/stable32

Conversation

@backportbot

Copy link
Copy Markdown

Backport of PR #59535

@backportbot
backportbotBot requested a review from a team as a code ownerJune 26, 2026 21:17
@backportbot
backportbotBot requested review from Altahrim, CarlSchwan, icewind1991, miaulalala, nickvergessen, provokateurin and salmart-dev and removed request for a teamJune 26, 2026 21:17
@backportbotbackportbotBot added this to the Nextcloud 32.0.13 milestone Jun 26, 2026
@DerDreschner
DerDreschnerforce-pushed the backport/59535/stable32 branch from 5ee3b49 to c03306dCompareJuly 12, 2026 23:28
@nextcloud-botnextcloud-bot mentioned this pull request Jul 14, 2026
@miaulalala
miaulalalaforce-pushed the backport/59535/stable32 branch from c03306d to 3b3aa91CompareJuly 15, 2026 12:15
…m list methods
The background cleanup job operated on all rows including backups:
- clearOlderThanClearAt() deleted backup rows with expired clear_at,
destroying saved statuses before they could be restored
- clearStatusesOlderThan() overwrote backup statuses to OFFLINE,
corrupting saved DND/away states
Additionally, findAll() leaked backup rows into user-facing lists,
and findAllRecent() filtered backups via slow LIKE pattern instead
of the is_backup column.
Add is_backup=false filter to all four methods.
AI-Assisted-By: Claude Opus 4.6
Signed-off-by: Anna Larch <anna@nextcloud.com>
UserDeletedListener only called removeUserStatus(), leaving backup
status rows (prefixed _userId) orphaned in the database forever.
AI-Assisted-By: Claude Opus 4.6
Signed-off-by: Anna Larch <anna@nextcloud.com>
Multiple code paths in StatusService silently swallowed failures,
making it impossible to debug status reliability issues. Add debug
logging for: backup creation conflicts, aborted automated status
changes, failed revert operations, and concurrent insert conflicts.
AI-Assisted-By: Claude Opus 4.6
Signed-off-by: Anna Larch <anna@nextcloud.com>
… queries
- testFindAllExcludesBackups: verify findAll() doesn't return backup rows
- testFindAllRecentExcludesBackups: verify findAllRecent() excludes backups
- testClearOlderThanClearAtPreservesBackups: verify backup rows survive
clear_at cleanup
- testClearStatusesOlderThanPreservesBackups: verify backup statuses aren't
overwritten to OFFLINE by age-based cleanup
- testHandleWithCorrectEvent: verify removeBackupUserStatus() is also called
when a user is deleted
AI-Assisted-By: Claude Opus 4.6
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala
miaulalalaforce-pushed the backport/59535/stable32 branch from 3b3aa91 to 6fd5fe7CompareJuly 15, 2026 13:45
@AndyScherzinger
AndyScherzinger merged commit 3af8a43 into stable32Jul 15, 2026
220 of 226 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/59535/stable32 branch July 15, 2026 21:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nickvergessen@CarlSchwan@AndyScherzinger@miaulalala