Skip to content

Conversation

@nickvergessen
Copy link
Member

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.

@blizzz
Copy link
Member

blizzz commented Apr 18, 2019

As LDAP seems to set the user name/email some more times, it basically added the 6 jobs on each login?

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.

Copy link
Member

@rullzer rullzer left a 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

@kesselb
Copy link
Contributor

kesselb commented May 9, 2019

Could you rebase? 🤔

@nickvergessen nickvergessen force-pushed the bugfix/noid/lookup-server-connector-background-jobs-problem branch from ff8dbf7 to a5c52bc Compare May 9, 2019 13:28
@rullzer
Copy link
Member

rullzer commented May 11, 2019

@kesselb rebase happend. review?

@rullzer rullzer requested a review from MorrisJobke July 9, 2019 17:55
@MorrisJobke MorrisJobke mentioned this pull request Jul 15, 2019
28 tasks
@nickvergessen
Copy link
Member Author

Still waiting for reviews @MorrisJobke @blizzz @ChristophWurst

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke
Copy link
Member

Let me rebase to trigger CI again.

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]>
@MorrisJobke MorrisJobke force-pushed the bugfix/noid/lookup-server-connector-background-jobs-problem branch from a5c52bc to 30051e7 Compare July 18, 2019 09:24
@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 18, 2019
@MorrisJobke
Copy link
Member

@nickvergessen Should we back port this?

@nickvergessen
Copy link
Member Author

In theory it would be cool, but I think its too heavy :/

@MorrisJobke
Copy link
Member

In theory it would be cool, but I think its too heavy :/

Okay. Then keeping it here.

@rullzer rullzer merged commit 940a313 into master Jul 18, 2019
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/lookup-server-connector-background-jobs-problem branch July 18, 2019 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: federation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants