Skip to content

Fix lookup server connector background jobs problem - #15143

Merged
rullzer merged 6 commits into
masterfrom
bugfix/noid/lookup-server-connector-background-jobs-problem
Jul 18, 2019
Merged

Fix lookup server connector background jobs problem#15143
rullzer merged 6 commits into
masterfrom
bugfix/noid/lookup-server-connector-background-jobs-problem

Conversation

@nickvergessen

Copy link
Copy Markdown
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
Copy Markdown
Member

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.

@rullzerrullzer left a comment

Copy link
Copy Markdown
Member

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

Comment threadapps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@kesselb

Copy link
Copy Markdown
Contributor

Could you rebase? 🤔

@nickvergessen
nickvergessenforce-pushed the bugfix/noid/lookup-server-connector-background-jobs-problem branch from ff8dbf7 to a5c52bcCompareMay 9, 2019 13:28
@rullzer

Copy link
Copy Markdown
Member

@kesselb rebase happend. review?

@rullzer
rullzer requested a review from MorrisJobkeJuly 9, 2019 17:55
@MorrisJobkeMorrisJobke mentioned this pull request Jul 15, 2019
28 tasks
@nickvergessen

Copy link
Copy Markdown
MemberAuthor

Still waiting for reviews @MorrisJobke@blizzz@ChristophWurst

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Let me rebase to trigger CI again.

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
To ensure there is only 1 background job per user
Signed-off-by: Joas Schilling <coding@schilljs.com>
@MorrisJobke
MorrisJobkeforce-pushed the bugfix/noid/lookup-server-connector-background-jobs-problem branch from a5c52bc to 30051e7CompareJuly 18, 2019 09:24
@MorrisJobkeMorrisJobke 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
Copy Markdown
Member

@nickvergessen Should we back port this?

@nickvergessen

Copy link
Copy Markdown
MemberAuthor

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

@MorrisJobke

Copy link
Copy Markdown
Member

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

Okay. Then keeping it here.

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

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: federation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@nickvergessen@blizzz@kesselb@rullzer@MorrisJobke