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

[stable16] Do not keep searching for recent #16432

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #16424

If userA has a lot of recent files. But only shares 1 file with userB
(that has no files at all). We could keep searching until we run out of
recent files for userA.

Now assume the inactive userB has 20 incomming shares like that from
different users. getRecent then basically keeps consuming huge amounts
of resources and with each iteration the load on the DB increases
(because of the offset).

This makes sure we do not get more than 3 times the limit we search for
or more than 5 queries.

This means we might miss some recent entries but we should fix that
separatly. This is just to make sure the load on the DB stays sane.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer merged commit eaf4147 into stable16 Jul 17, 2019
@delete-merged-branch delete-merged-branch bot deleted the backport/16424/stable16 branch July 17, 2019 07:20
@rullzer rullzer mentioned this pull request Aug 7, 2019
2 tasks
@rullzer rullzer mentioned this pull request Sep 12, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants