Skip to content

[stable34] fix(metadata): bind chunked file ids in dropMetadataForFiles - #64092

Merged
provokateurin merged 1 commit into
nextcloud:stable34from
dispather:fix/metadata-chunk-binding-stable34
Sep 23, 2026
Merged

provokateurin merged 1 commit into
nextcloud:stable34from
dispather:fix/metadata-chunk-binding-stable34

Conversation

@dispather

Copy link
Copy Markdown

Manual backport of #62331 to stable34.

MetadataRequestService::dropMetadataForFiles() splits $fileIds into chunks of 1000 and iterates over them, but the IN clause still binds the full $fileIds array instead of the current $chunk. Each iteration therefore issues the same full-size DELETE, which produces the More than 1000 expressions in a list are not allowed on Oracle. entry from QueryBuilder::prepareForExecute() and repeats an identical statement once per chunk.

The sibling method IndexRequestService::dropIndexForFiles() carried the same copy/paste bug and was already backported to stable34 in #62771. This applies the equivalent one-line fix to the metadata table.

Difference from the master patch

master's #62331 switches the chunk size to IQueryBuilder::MAX_IN_PARAMETERS, which does not exist on stable34. This PR keeps the existing literal 1000 and changes only the bound variable, matching the shape of the already-merged stable34 backport #62771 (+1/-1, same file family).

getMetadataFromFileIds() a few lines above also binds an unchunked $fileIds, but master's #62331 leaves it untouched as well, so it is out of scope here.

Why this is filed by hand

/backport to stable34 was requested on #62331 twice without response — in prose on 2026-08-08 and as the bot command on 2026-09-06. Both requesters have author_association: NONE, so the command does not appear to be honoured from non-members. Filing manually rather than leaving stable34 unpatched; happy to close this if backportbot is triggered by a maintainer instead.

Refs #62331, #62771, #62325

Signed-off-by: dispather <62810211+dispather@users.noreply.github.com>
@dispather
dispather requested a review from a team as a code owner September 7, 2026 09:15
@dispather
dispather requested review from Altahrim, leftybournes, provokateurin and salmart-dev and removed request for a team September 7, 2026 09:15
@CarlSchwan CarlSchwan added the 3. to review Waiting for reviews label Sep 7, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@provokateurin
provokateurin merged commit 834f1d2 into nextcloud:stable34 Sep 23, 2026
148 of 155 checks passed
@welcome

welcome Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

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.

4 participants