Skip to content

Conversation

@marcelklehr
Copy link
Member

fixes #1161

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors file event processing to be asynchronous by introducing a queue-based system for access updates. When files are shared or permissions change, instead of processing the updates immediately in the event handler, the changes are now queued to a database table and processed asynchronously via a background job. This improves the responsiveness of file operations by deferring expensive face detection synchronization logic.

  • Introduces a new recognize_access_updates database table to queue access change events
  • Creates background job infrastructure to process queued access updates in batches
  • Refactors FileListener to defer access update processing instead of handling synchronously

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
lib/Migration/Version011000001Date20251215094821.php Creates the new recognize_access_updates table schema
lib/Db/AccessUpdate.php Entity class representing queued access update records
lib/Db/AccessUpdateMapper.php Data access layer for managing access update queue entries
lib/Service/AccessUpdateService.php Service containing the business logic moved from FileListener
lib/BackgroundJobs/ProcessAccessUpdatesJob.php Background job that processes queued access updates asynchronously
lib/Hooks/FileListener.php Refactored to queue access updates instead of processing synchronously; removes ShareCreatedEvent and ShareDeletedEvent handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/async-event-processing branch from 4f68ede to a8fb342 Compare December 16, 2025 12:36
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr

This comment was marked as resolved.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/async-event-processing branch from eaeeafd to 82d555b Compare December 18, 2025 09:56
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…lly processed in queue

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…a user folder

plus make sure to tear down fs in between action processing to prevent OOM

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr changed the title fix(FileListener): Process file events asynchronously refactor(FileListener): Process file events asynchronously Dec 18, 2025
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr merged commit 5bd0276 into main Dec 18, 2025
44 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharing folders with many users breaks

2 participants