Skip to content

fix(userstatus): catch unique constrain violation on revert - #45055

Merged
miaulalala merged 1 commit into
masterfrom
fix/revert-user-status-exception
May 6, 2024
Merged

fix(userstatus): catch unique constrain violation on revert#45055
miaulalala merged 1 commit into
masterfrom
fix/revert-user-status-exception

Conversation

@miaulalala

@miaulalalamiaulalala commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

Summary

If during the revert of a status another operation wrote an additional status, the operation will fail with a unique constraint violation. Since we cannot determine which status is valid, we catch the exception and silently drop the revert.

Checklist

@miaulalalamiaulalala added the 2. developing Work in progress label Apr 26, 2024
@miaulalalamiaulalala self-assigned this Apr 26, 2024
@miaulalalamiaulalala added 3. to review Waiting for reviews bug and removed 2. developing Work in progress labels Apr 26, 2024
Comment threadapps/user_status/lib/Service/StatusService.php Fixed
@miaulalala

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

@miaulalala

Copy link
Copy Markdown
ContributorAuthor

/backport to stable28

@miaulalala
miaulalala requested review from a team, ArtificialOwl, sorbaugh and yemkareems and removed request for a teamApril 26, 2024 13:08
Signed-off-by: Anna Larch <anna@nextcloud.com>
@solracsf

Copy link
Copy Markdown
Member

Backport to 27? #42625 (comment)

@blizzzblizzz mentioned this pull request Jul 24, 2024
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.

[Bug]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'userid' for key 'user_status_uid_ix'

6 participants

@miaulalala@solracsf@ChristophWurst@github-advanced-security@come-nc@joshtrichards