-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix lookup server connector background jobs problem #15143
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 lookup server connector background jobs problem #15143
Conversation
Hooks should not be fired if there was no change. But then, if every change lead to a new background job being created (and with the double-triggering you fixed on in another PR) 3 changes might be possible. Email, Displayname for sure, then perhaps avatar and/or quota. |
rullzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't test in dept but makes sense
|
Could you rebase? 🤔 |
ff8dbf7 to
a5c52bc
Compare
|
@kesselb rebase happend. review? |
|
Still waiting for reviews @MorrisJobke @blizzz @ChristophWurst |
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
|
Let me rebase to trigger CI again. |
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
To ensure there is only 1 background job per user Signed-off-by: Joas Schilling <[email protected]>
a5c52bc to
30051e7
Compare
|
@nickvergessen Should we back port this? |
|
In theory it would be cool, but I think its too heavy :/ |
Okay. Then keeping it here. |
Some 50 user instances have 400k pending jobs for lookup updates
The first problem is that the job was scheduled too often with #15020
The second one is that each time any value changed, a new job was scheduled (because at least the retry count and the last execution was different).
So you ended up with 6 jobs per change on user data.
As LDAP seems to set the user name/email some more times, it basically added the 6 jobs on each login?
So now the app got a little update and in the end can only have 1 background job per user.
Existing update requests are killed when the userId is not set in the arguments, so the table should clean up on the next few cron runs after the update.