Commit Graph

360 Commits (stable28)

Author SHA1 Message Date
Robin Appelman f1581f3767
chore: fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 15:42:14 +07:00
Robin Appelman f344c69b82
fix: improve checks for moving shares/storages into other mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 15:07:22 +07:00
Robin Appelman c81392cec7 fix: fix mimetype not being updated when changing file extention on object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-11 09:02:00 +07:00
Josh Richards 0f27494a68 Clean-up some remaining readdir calls with undesirable false evaluation potential
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>

[skip ci]
2024-11-12 13:08:18 +07:00
Louis 64583a0f86
Merge pull request #48985 from nextcloud/backport/47986/stable28
[stable28] perf(ObjectStoreStorage): Improve (slow) move on same object bucket
2024-10-31 15:57:22 +07:00
Côme Chilliet ab611a279a
fix(tests): Fix most obvious errors in ObjectStore tests
Some are still failing

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-31 14:41:19 +07:00
Christoph Fiehe dec5a5fe9b perf(ObjectStoreStorage): Improve (slow) move on same object bucket
This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.

The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.

Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-10-29 15:53:48 +07:00
Robin Appelman accf707659 test: add test for nested jail cross-storage move
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-10-29 10:36:33 +07:00
Côme Chilliet ec0ff3d5dd fix(tests): Fix Folder tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-08 18:14:26 +07:00
Robin Appelman b8464efa69 test: put parent items into cache in tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-10-08 18:14:26 +07:00
Robin Appelman f1df40f718 test: fix incorrect ltrim usage in test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-10-08 18:14:26 +07:00
Louis Chemineau 483eaa7e72
fix(users): Don't crash if disabled user is missing in the database
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-23 16:59:58 +07:00
provokateurin e77ac5c8e1 fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-04 18:01:36 +07:00
Ferdinand Thiessen e102c752f9 fix: `OCP\Files\Node\Folder::search` was not setting the owner
The owner was not set on the file info causing e.g. webdav searches to never return the known owner.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-30 11:05:22 +07:00
Robin Appelman da114d5c7d test: add test for jail watcher
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-04-10 01:21:01 +07:00
Robin Appelman 404b340dda add test for updating etag with unchanged mtime in child folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-31 18:27:29 +07:00
Robin Appelman f56a8e7e9e add test for updating etag with unchanged mtime
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-31 18:27:29 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Ferdinand Thiessen 5172baaf8b
fix(ObjectStore): Make copying behavior consistent with local storage
Drop file permissions on copy like we do on local storage.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-11-17 12:54:37 +07:00
Robin Appelman b942850af9
optimize UserMountCache::registerStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-16 16:21:59 +07:00
Robin Appelman f4fa2fb93c
optimize isShared and isMounted
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-08 17:34:58 +07:00
Robin Appelman b11ca34bbd
Merge pull request #40499 from nextcloud/known-mtime-wrapper
add wrapper for external storage to ensure we don't get an mtime that is lower than we know it is
2023-09-21 18:33:15 +07:00
Daniel Kesselberg 18af7cc86b test: add test for cache mount provider
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-09-20 15:42:23 +07:00
Robin Appelman ccf8843d9f apply known mtime wrapper for external storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-19 13:58:35 +07:00
Robin Appelman 5bf34979fe add wrapper to ensure we don't get an mtime that is lower than we know it is
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-19 13:58:15 +07:00
Julius Härtl 7f958e81d3
fix: Pass parent to NonExistingFile instances
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-13 10:28:28 +07:00
Robin Appelman 64f62f7cfd
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
move share permission logic to storage wrapper
2023-09-04 14:05:14 +07:00
Simon L 489a57e9a3
Merge pull request #39707 from nextcloud/bugfix/39706/local-ext-storage-unavailable-mode 2023-09-04 12:05:36 +07:00
John Molakvoæ (skjnldsv) f828dce597
Fix sharing creation insert and get
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2023-09-02 10:25:24 +07:00
Robin Appelman e704470c79
update tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-31 22:37:10 +07:00
Vincent Petry 8d1a3daa3f Allow ext storage Local to go unavailable
Whenever an external storage of type Local points at a non-existing
directory, process this as a StorageNotAvailable instead of returning
404.

This makes desktop clients ignore the folder instead of deleting it when
it becomes unavailable.

The code change was limited to external storages to avoid issues during
setup and with the default home storage.
Signed-off-by: Vincent Petry <pvince81@yahoo.fr>
2023-08-29 11:04:31 +07:00
Robin Appelman b6c3507aa0 only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 14:25:28 +07:00
Robin Appelman e73889a240 cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-16 15:25:05 +07:00
Ferdinand Thiessen 5b37d6d9ff tests: Add test for CacheEntry getters
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-08-16 14:00:21 +07:00
Côme Chilliet ee756579a7
Fix setting static property in tests on PHP 8.3
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-08-14 16:27:56 +07:00
Joas Schilling ad12a740cb
fix!: Remove symfony EventDispatcherInterface from User
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:37 +07:00
Joas Schilling 44a0a62107
fix: Move Node HookConnecter events to IEventDispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:53 +07:00
Arthur Schiwon f6ac874dbf
chore: ugly type juggling
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-06-21 16:53:20 +07:00
Robin Appelman 2ea41dab93
repair -1 folder sizes for object store background scan
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-10 19:33:26 +07:00
Côme Chilliet b294edad80
Merge branch 'master' into enh/type-iconfig-getter-calls
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2023-04-20 16:52:38 +07:00
Julius Härtl d9c81f56ad tests: Adapt node related unit tests mocks to required root view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-04-17 23:46:52 +07:00
Julius Härtl 160bd75d0a fix: Use proper path when creating node instances
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-04-17 23:46:52 +07:00
Côme Chilliet 8d5165e8dc
Adapt tests to config value typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 17:42:14 +07:00
Côme Chilliet 4393b96542
Remove unused method getLocalFolder
It’s not used and not in any OCP interface/class.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:34 +07:00
Côme Chilliet 966a3e6963
Tidy up typing in OC\Files\View
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:33 +07:00
Robin Appelman 91d5f6a826 more filesystem setup performance instrumentation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 11:11:13 +07:00
Julius Härtl 08802ad13f
Merge pull request #36566 from nextcloud/mount-find-by-numeric-id 2023-02-08 20:04:57 +07:00
Robin Appelman 9f3dbb699a fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-07 15:50:10 +07:00
Côme Chilliet 0f8c34cdc6
Fix filesize return type error in ViewTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +07:00
Louis Chemineau d8b479752d Fix hookconnector tests
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +07:00