Commit Graph

2012 Commits

Author SHA1 Message Date
Andy Scherzinger
39ff32a33b Merge pull request #58134 from nextcloud/carl/lock-propagator-order
fix(propagator): Improve lock behavior of propagator
2026-02-09 16:04:38 +01:00
Carl Schwan
95b3bd98d9 fix(propagator): Lock rows also in propagateChange
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-09 12:11:21 +01:00
Carl Schwan
f3778bc9c7 fix(propagator): Improve lock behavior of propagator
Fix possible dead locks when running the propagator caused by two
requests updating the same amount rows in transactions.

- Lock rows always in the same deterministic order by sorting the
  path_hash first

- On all database outside of sqlite, also do first a SELECT FOR UPDATE
  to lock all the rows used in batch UPDATE calls, afterward to decrease
  the risk of two requests trying to lock the same rows

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-09 12:10:56 +01:00
provokateurin
f12cecb684 feat(rector): Enable SafeDeclareStrictTypesRector
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-09 10:59:31 +01:00
Robin Appelman
6c9418880f Merge pull request #57757 from nextcloud/getowner-no-mountpoints
fix: don't include the mountpoints when getting fileinfo for getOwner
2026-02-06 17:22:51 +01:00
Robin Appelman
c801d63e5a fix: don't include the mountpoints when getting fileinfo for getOwner
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-06 15:19:30 +01:00
Carl Schwan
fb3f9fe2de refactor: Update repairs jobs
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:54:24 +01:00
Carl Schwan
3979c493f9 refactor: Apply second batch of comments
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:52:51 +01:00
Carl Schwan
65e769a861 refactor: Apply comments
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:46 +01:00
Carl Schwan
7b6078875b refactor: Run rector on lib/private
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
Andy Scherzinger
08e1d9b83e Merge pull request #58025 from nextcloud/carl/refactor-share-mountprovider
refactor(mount-provider): Refactor share mount provider
2026-02-05 11:50:40 +01:00
Julius Knorr
b933156a3a Merge pull request #57914 from nextcloud/feat/extendable-propfind
feat(dav): allow extending propfind properties via event
2026-02-05 10:49:59 +01:00
Robin Appelman
72150d6deb fix: getById: don't setup for all users with access by default
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-04 18:23:34 +01:00
Robin Appelman
b51d332719 fix: make sure all mounts are setup in getById
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-04 18:23:33 +01:00
Robin Appelman
82d33b7727 fix: still setup for user when setting up root path with children
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-02-04 18:23:32 +01:00
Carl Schwan
8f81b91733 refactor(mount-provider): Refactor share mount provider
- Add more precise types
- Remove dead code

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-04 12:46:14 +01:00
Benjamin Frueh
9d4b11587e feat(dav): allow extending propfind properties via event
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

Update lib/public/Files/Events/BeforePropfindEvent.php

Co-authored-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>

Update lib/public/Files/Events/BeforePropfindEvent.php

Co-authored-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>

refactor: rename BeforePropfindEvent to BeforeRemotePropfindEvent

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

chore: update composer autoloader for new event class

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

Update lib/public/Files/Events/BeforeRemotePropfindEvent.php

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>
2026-02-02 11:45:10 +01:00
Robin Appelman
51a4bc519b fix: make getMountsForFileId work with sharding again
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-30 09:52:18 +01:00
Benjamin Gaussorgues
4a077c3454 Merge pull request #57815 from nextcloud/feat/user-mount-cache-perf 2026-01-29 16:35:54 +01:00
Kate
400fe317e9 Merge pull request #57893 from nextcloud/carl/cachemountinfo-refactor 2026-01-29 15:10:22 +01:00
Andy Scherzinger
8160f0af8a Merge pull request #57892 from nextcloud/carl/binary-search-findIn
perf(MountManager): use binary search to find mount in path
2026-01-29 13:53:47 +01:00
Carl Schwan
04ddeeec4a perf(MountManager): use binary search to find mount in path
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-29 11:41:58 +01:00
Benjamin Gaussorgues
37dbe1324e Merge pull request #57890 from nextcloud/carl/perf-invert-condition 2026-01-29 10:55:08 +01:00
Benjamin Gaussorgues
7f71b46942 Merge pull request #57882 from nextcloud/useStrictComparisonOperator 2026-01-29 09:20:18 +01:00
Carl Schwan
33d6f1e984 refactor(CacheMountInfo): Use constructor paramater promotion
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-29 01:45:48 +01:00
Carl Schwan
668ad4faac perf(UserMountCache): Invert condition so that we avoid some SQL queries
getStorageId creates some SQL queries, while the other queries don't, so
compare that last.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-28 23:09:08 +01:00
Kate
cf1fc78175 Merge pull request #57878 from nextcloud/fix/view/put-fileinfo-cacheentry 2026-01-28 23:07:47 +01:00
Carl Schwan
ef226e9ec6 Merge pull request #57826 from nextcloud/carl/setupmanager
feat(OCP): Expose setup manager to OCP
2026-01-28 21:39:15 +01:00
Git'Fellow
080335009b refactor: use strict comparison operator
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-01-28 21:11:47 +01:00
Carl Schwan
7100c71166 perf(metadata): Add optimized sharding for metadata deletion
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-28 17:18:33 +01:00
Carl Schwan
fd3878448b feat(filecache): Scale DB query created when deleting file from filecache
Instead of creating a CacheEntryRemovedEvent for each deleted files,
create a single CacheEntriesRemovedEvent which wrap multiple
CacheEntryRemovedEvent.

This allow listener to optimize the query they do when multiple files
are deleted at the same time (e.g. when deleting a folder).

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2026-01-28 16:07:57 +01:00
provokateurin
d7fa94b90b fix(View): Handle ICacheEntry returned by FileInfo->getData()
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-01-28 15:33:46 +01:00
Kate
7da87dcbfd Merge pull request #57767 from nextcloud/setup-provider-all-authoritative 2026-01-27 21:59:57 +01:00
Benjamin Gaussorgues
f71f19c0c7 feat: optimize user mount cache
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-01-27 16:31:32 +01:00
Robin Appelman
8443e166af fix: don't do full setup in setupForProvider if all requested providers are authoritative
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-27 15:52:31 +01:00
Carl Schwan
ae73f7aaf5 refactor(setup-manager): Use ISetupManager instead of SetupManager
Keep using the OC API in the mount manager and OC_Utils, but the rest is
now using the public API.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-27 15:19:19 +01:00
Kate
3950ef8b16 Merge pull request #57829 from nextcloud/setup-path-root 2026-01-27 08:55:46 +01:00
Robin Appelman
a6bcb1075f fix: don't try to setup for a user when setting up /
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-26 21:10:15 +01:00
Carl Schwan
0fe01de26c feat(OCP): Expose setup manager to OCP
It's used by a lot of apps so expose just the two methods that are most
of the time used, to prevent the apps to relly on private APIs.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-26 17:12:02 +01:00
Benjamin Gaussorgues
2437046e25 Merge pull request #57756 from nextcloud/carl/function-builder 2026-01-26 14:14:51 +01:00
Stephan Orbaugh
9b547f5c8d Merge pull request #57733 from nextcloud/carl/propagator-rollback
fix(Propagator): rollback transaction if it fails
2026-01-26 11:27:21 +01:00
Andy Scherzinger
ebf9cbf4a1 Merge pull request #57570 from nextcloud/carl/perf/normalized-path
perf(normalization): Optimize path normalization
2026-01-26 00:16:03 +01:00
Carl Schwan
b4dfdf6492 refactor: Prefer using IFunctionBuilder than createFunction
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-23 16:58:38 +01:00
Carl Schwan
dd26a8b7eb fix(cache): Fix parsing cache entry from groupfolder and collectives
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-23 10:52:44 +01:00
Carl Schwan
3900c45ea4 fix(Propagator): rollback transaction if it fails 2026-01-22 17:08:57 +01:00
Robin Appelman
d71c6796ca feat: perform share mount validation on share instead of on mount
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-21 16:35:53 +01:00
Carl Schwan
09a1ca3981 perf(normalization): Optimize path normalization
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-21 14:58:05 +01:00
Benjamin Gaussorgues
aba8a7ff86 Merge pull request #57549 from nextcloud/carl/optimize-getdirectory-content 2026-01-16 14:09:14 +01:00
Andy Scherzinger
a7ea180317 Merge pull request #57576 from nextcloud/missing-cache-entry-data
fix: dont error on missing path_hash/checksum CacheEntry fields
2026-01-16 14:04:46 +01:00
Carl Schwan
eadcd1cc84 refactor: Use str_starts_with
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2026-01-16 10:58:16 +01:00