Skip to content

Only mount the storages for the user once - #11539

Merged
PVince81 merged 2 commits into
masterfrom
mount-setup-once
Oct 31, 2014
Merged

PVince81 merged 2 commits into
masterfrom
mount-setup-once

Conversation

@icewind1991

Copy link
Copy Markdown
Contributor

Filesystem::initMountPoints() is called in various places to get the filesystem loaded for sharing.

Currently every time the method is called the mount for the user will be overwritten by new instances of the storage which causes an overhead in case of external storage (having to re-initialize the connection), messes with the locking wrapper(a new instance will be created and the old one, holding any open locks is thrown away) and probably breaks some more assumptions regarding storages and storage wrappers.

This adds a basic check to make sure we only setup the mount points for each user once

cc @DeepDiver1975 @PVince81 @th3fallen

@PVince81

Copy link
Copy Markdown
Contributor

What about the cases with the share app where we need to call setUp() for another user ? Would that prevent switching users ?

@icewind1991

Copy link
Copy Markdown
Contributor Author

What about the cases with the share app where we need to call setUp() for another user ? Would that prevent switching users ?

No, it still allows setting up the filesystem for different users

@PVince81

Copy link
Copy Markdown
Contributor

I suppose this is also not possible to unit test?

@icewind1991

Copy link
Copy Markdown
Contributor Author

Not really, it's right within the filesystem setup mess (cleanup is being worked on)

@schiessle

Copy link
Copy Markdown
Contributor

looks good and also solved #11736 to a large extend 👍

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 1 updated code elements

@ghost

ghost commented Oct 28, 2014

Copy link
Copy Markdown

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/1434/
🚀 Test PASSed. 🚀

@schiessle

Copy link
Copy Markdown
Contributor

This needs a second reviewer... Would be great to get it in, because it also blocks other pull requests.

@PVince81 maybe you want to have a look at it?

@PVince81

Copy link
Copy Markdown
Contributor

Code makes sense 👍

PVince81 pushed a commit that referenced this pull request Oct 31, 2014
Only mount the storages for the user once
@PVince81
PVince81 merged commit 55658e7 into master Oct 31, 2014
@PVince81
PVince81 deleted the mount-setup-once branch October 31, 2014 09:42
@schiessle

Copy link
Copy Markdown
Contributor

This was fast 😄

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants