Skip to content

[stable35] fix(files_reminders): keep folder preload for folders over 512 entries - #65476

Open
backportbot[bot] wants to merge 1 commit into
stable35from
backport/64706/stable35
Open

backportbot[bot] wants to merge 1 commit into
stable35from
backport/64706/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 13, 2026

Copy link
Copy Markdown

Backport of PR #64706

@AndyScherzinger
AndyScherzinger force-pushed the backport/64706/stable35 branch from 3be281c to 5814630 Compare November 4, 2026 22:02
@AndyScherzinger
AndyScherzinger requested a review from a team as a code owner November 4, 2026 22:02
@AndyScherzinger
AndyScherzinger requested review from GhassenKefi and pabzm and removed request for a team November 4, 2026 22:02

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CI related, needs to be adjusted for Nextcloud 35.

  1. OCA\FilesReminders\Tests\Service\ReminderServiceTest::testCreateAfterPreloadIsReturned
    PHPUnit\Framework\MockObject\Generator\UnknownTypeException: Class or interface "OCP\Files\IUserFolder" does not exist

/home/runner/actions-runner/_work/server/server/apps/files_reminders/tests/Service/ReminderServiceTest.php:86
/home/runner/actions-runner/_work/server/server/apps/files_reminders/tests/Service/ReminderServiceTest.php:148

  1. OCA\FilesReminders\Tests\Service\ReminderServiceTest::testUpdateAfterPreloadIsReturned
    PHPUnit\Framework\MockObject\Generator\UnknownTypeException: Class or interface "OCP\Files\IUserFolder" does not exist

/home/runner/actions-runner/_work/server/server/apps/files_reminders/tests/Service/ReminderServiceTest.php:86
/home/runner/actions-runner/_work/server/server/apps/files_reminders/tests/Service/ReminderServiceTest.php:165

  1. OCA\FilesReminders\Tests\Service\ReminderServiceTest::testRemoveAfterPreloadIsNotReturned
    PHPUnit\Framework\MockObject\Generator\UnknownTypeException: Class or interface "OCP\Files\IUserFolder" does not exist

/home/runner/actions-runner/_work/server/server/apps/files_reminders/tests/Service/ReminderServiceTest.php:86
/home/runner/actions-runner/_work/server/server/apps/files_reminders/tests/Service/ReminderServiceTest.php:182

_

use OCP\Cache\CappedMemoryCache;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\IUserFolder;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

36+ only

ReminderService::cacheFolder() stored one entry per child in the in-memory
cache, which is capped at 512 entries. Listing a folder with 512 or more
children evicted entries before the DAV plugin read them, so each evicted
file fell back to its own query.

Keep the folder preload in a separate per-request map and drop the entry
whenever a reminder is written, so later changes in the same request win.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv
skjnldsv force-pushed the backport/64706/stable35 branch from 5814630 to c95cd52 Compare November 5, 2026 14:47

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants