Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(user_ldap): Catch DB Exceptions when updating group memberships #43999

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Mar 5, 2024

  • Resolves: #

Summary

When inserting/deleting group membership, it may simply fail because another job or request is doing the same thing concurrently. In this case we must not crash but simply ignore the error. When it fails for unexpected reason, we must log it but not crash.

Checklist

@come-nc come-nc added the 3. to review Waiting for reviews label Mar 5, 2024
@come-nc come-nc added this to the Nextcloud 29 milestone Mar 5, 2024
@come-nc come-nc requested a review from icewind1991 March 5, 2024 12:00
@come-nc come-nc self-assigned this Mar 5, 2024
@come-nc come-nc requested review from a team, ArtificialOwl and nfebe and removed request for a team March 5, 2024 14:01
@icewind1991
Copy link
Member

it probably makes sense to catch the unique errors in the GroupMembershipMapper

@come-nc
Copy link
Contributor Author

come-nc commented Mar 5, 2024

it probably makes sense to catch the unique errors in the GroupMembershipMapper

But no other mapper is doing so, the insert/delete methods are standard from parent class?

@icewind1991
Copy link
Member

it probably makes sense to catch the unique errors in the GroupMembershipMapper

But no other mapper is doing so, the insert/delete methods are standard from parent class?

Fair enough

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the fix/user_ldap-catch-db-errors-when-updating-group-memberships branch from 1be40c5 to d163347 Compare March 6, 2024 09:19
@come-nc come-nc merged commit 4a23308 into master Mar 6, 2024
160 checks passed
@come-nc come-nc deleted the fix/user_ldap-catch-db-errors-when-updating-group-memberships branch March 6, 2024 10:44
@blizzz blizzz mentioned this pull request Mar 7, 2024
@kesselb
Copy link
Contributor

kesselb commented Aug 19, 2024

What about a backport for 28? I just found this case 36 times (from 2024-08-05 to 2024-08-19) in a logfile.

@come-nc
Copy link
Contributor Author

come-nc commented Aug 20, 2024

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants