Repository navigation
[stable35] fix(files_reminders): keep folder preload for folders over 512 entries - #65476
backportbot[bot] wants to merge 1 commit into
Conversation
3be281c to
5814630
Compare
susnux
left a comment
There was a problem hiding this comment.
CI related, needs to be adjusted for Nextcloud 35.
- 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
- 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
- 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; |
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>
5814630 to
c95cd52
Compare
Backport of PR #64706