-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: perform share mount validation on share instead of on mount #57295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bcdfc45 to
eeffc0a
Compare
|
I forgot to handle talk/circle/etc shares... It did seem suspiciously easy compared to some earlier attempts... |
c8e2abd to
9f2e4a7
Compare
9f2e4a7 to
07b9b8e
Compare
|
Putting this on draft to make sure it doesn't get merged without considering the needed share provider work (can't review-block my own PR...) |
07b9b8e to
f92e93a
Compare
26e0887 to
85e56ab
Compare
|
Still on draft to block it form being merged by accident, but otherwise ready for review |
Signed-off-by: Robin Appelman <robin@icewind.nl>
…e positives Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
7badba8 to
34fc215
Compare
artonge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good code wise. One perf question, though, where it would be nice to double-check.
| $mountPoints = array_map(fn (ICachedMountInfo $mount) => $mount->getMountPoint(), $cachedMounts); | ||
| $mountsByPath = array_combine($mountPoints, $cachedMounts); | ||
|
|
||
| $shares = $this->shareMountProvider->getSuperSharesForUser($user); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I right that getSuperSharesForUser() and verifyMountPoint() could take a lot of time?
As this been tested on next.perftesting? Like adding a user, or a group to a talk conversation for example?
I am wondering if we should find a way to put that into a background job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is work that was previously done on-mount, so while it can be expensive yes, it's moving the expense from "read" (with some caching) to "write" time.
Putting it in a background job would mean that we can end up mounting the share before we did the conflict resolution. (Unless we do the work to block mounting the share until then)
|
/backport to stable33 |
Extracted from #57229
Currently the share mount is validated (check that the parent exists and the share doesn't conflict with existing files for the user) when the share is mounted. This moves the check to when the share is created or a user gains access to a share.
While this is more complex then doing it at mount time, it ensures that we only pay the cost once instead of repeatedly on mount.
The existing on-mount method is also incompatible with authoritative mount points.
Requires