Needs review
Project:
OpenID Connect / OAuth client
Version:
3.0.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Oct 2023 at 07:03 UTC
Updated:
4 Nov 2025 at 13:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rakshith.thotada commentedComment #3
rakshith.thotada commentedComment #4
rakshith.thotada commentedComment #5
rakshith.thotada commentedComment #6
rakshith.thotada commentedComment #9
dressedk commentedI have opened an issue fork for for this issue.
I suggest a few changes to the patch by #rakshith.thotada :
1. Place the try/catch block within the foreach loop, as I don't think we want to skip the whole update hook. By placing it inside the foreach loop, we make sure that the update hook still runs through all entries.
2. Instead of catching a generel exception, I suggest we only want to catch the "IntegrityConstraintViolationException".
Comment #11
d.steindl commentedSince the `openid_connect_authmap` table can have thousands of entries, I've changed the updater to use Drupals `$sandbox` for the update hook `openid_connect_update_8204`. The updater now processed 500 entries for each operation instead of all at once.
And in order to ensure that each entry is only processed one time (even in the case that the updater fails), I've added the deletion of the processed entry from the old `openid_connect_authmap` directly after the new entry was created in the `authmap` table.
With these adjustments, the update should now complete safely and efficiently, even for large installations.