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

Limit getIncomplete query to one row #24715

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Dec 15, 2020

Found this while debugging #24401.

How to test:

  • Go to oc_filecache and set size to -1 for some or all files (to simulate a situation with many unscanned files)
  • Attach xdebug and set a breakpoint in getIncomplete
  • See (for example by evaluating $result->rowCount()) that the query returns x rows but only the first row is consumed

This pull request limits the number of results to 1.

Limit to one was already set for < Nextcloud 18 and got lost in a bigger refactoring: d3b6dbc#diff-f36621cc749f37af880e8d2d5ea4b70870a0a13de93ce1461cc99be75e1abf47L833-L834 (the second argument for prepare is limit).

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
Copy link
Contributor Author

kesselb commented Dec 15, 2020

It's not really a bug. I would still recommend to backport it.

@rullzer rullzer mentioned this pull request Dec 16, 2020
59 tasks
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

🙈

@rullzer rullzer mentioned this pull request Dec 18, 2020
39 tasks
@rullzer rullzer merged commit 4973f9b into master Dec 21, 2020
@rullzer rullzer deleted the bug/noid/limit-get-incomplete-to-1 branch December 21, 2020 08:15
@rullzer
Copy link
Member

rullzer commented Dec 21, 2020

/backport to stable20

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.

3 participants