Skip to content

perf: Optimize deleting the list of invalid shares#60660

Open
CarlSchwan wants to merge 1 commit into
masterfrom
carl/report-invalid-shares-impro
Open

perf: Optimize deleting the list of invalid shares#60660
CarlSchwan wants to merge 1 commit into
masterfrom
carl/report-invalid-shares-impro

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member

Summary

And make the code a bit easier to read.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@CarlSchwan CarlSchwan added this to the Nextcloud 35 milestone May 22, 2026
@CarlSchwan CarlSchwan self-assigned this May 22, 2026
@CarlSchwan CarlSchwan requested a review from a team as a code owner May 22, 2026 14:08
@CarlSchwan CarlSchwan removed the request for review from a team May 22, 2026 14:08
@CarlSchwan CarlSchwan added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label May 22, 2026
@CarlSchwan CarlSchwan force-pushed the carl/report-invalid-shares-impro branch from 9331c8f to 4d32706 Compare May 22, 2026 14:15
And make the code a bit easier to read.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
@CarlSchwan CarlSchwan force-pushed the carl/report-invalid-shares-impro branch from 4d32706 to f5b94b9 Compare May 26, 2026 14:41
$deletedInLastChunk = self::CHUNK_SIZE;
while ($deletedInLastChunk === self::CHUNK_SIZE) {
$deletedInLastChunk = 0;
while (true) {
$result = $query->executeQuery();

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.

The parameter isn't set on the first invocation, so this will fail, no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is a different query there is two $query with a limit of 1000 and $deleteQuery which then delete the results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews performance 🚀 ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants