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

perf: improve cleanup of tags/comments #47182

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

icewind1991
Copy link
Member

delete entire chunk at once instead of one-by-one

@icewind1991 icewind1991 added this to the Nextcloud 30 milestone Aug 12, 2024
@icewind1991 icewind1991 requested review from a team, Altahrim, yemkareems and provokateurin and removed request for a team August 12, 2024 14:14
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
delete entire chunk at once instead of one-by-one

Signed-off-by: Robin Appelman <[email protected]>
@icewind1991
Copy link
Member Author

/backport to stable30

$deletedInLastChunk = count($chunk);

$deleteQuery->setParameter('objectid', $chunk, IQueryBuilder::PARAM_INT_ARRAY);
$deletedEntries += $deleteQuery->executeStatement();
Copy link
Member

Choose a reason for hiding this comment

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

Should we wrap with a transaction to make it faster?

Copy link
Member Author

Choose a reason for hiding this comment

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

I expect that that will lead to issues around transaction sizes and deadlocks

@icewind1991 icewind1991 merged commit 40c91aa into master Aug 19, 2024
170 checks passed
@icewind1991 icewind1991 deleted the orphan-cleanup-chunk-perf branch August 19, 2024 11:40
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.

5 participants