Active share validation/authoritative mount improvements#57760
Active share validation/authoritative mount improvements#57760icewind1991 wants to merge 17 commits intomasterfrom
Conversation
b1a28af to
054c5c0
Compare
…s for new share" Signed-off-by: Joas Schilling <coding@schilljs.com>
…s for new share" Signed-off-by: Joas Schilling <coding@schilljs.com>
054c5c0 to
3e548a5
Compare
3e548a5 to
4851386
Compare
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
000d868 to
716d880
Compare
b35ead2 to
8e50698
Compare
f29cc31 to
4b00db9
Compare
provokateurin
left a comment
There was a problem hiding this comment.
The last commit should be backported as a bug fix
|
|
||
| $shares = $this->shareMountProvider->getSuperSharesForUser($user, $ignoreShares); | ||
|
|
||
| $mountsChanged = count($shares) !== count($shareMounts); |
There was a problem hiding this comment.
What does this mean? Should it be set to default, given that the loop might set it to true?
|
|
||
| try { | ||
| $query->executeStatement(); | ||
| unset($this->mountsForUsers[$user->getUID()]); |
There was a problem hiding this comment.
Why do we need to reset the mounts for a user when adding a new one?
There was a problem hiding this comment.
Because otherwise getMountsForUsers will return the old results
There was a problem hiding this comment.
But can't we only add the new mount?
4b00db9 to
4c18fc1
Compare
| foreach ($this->shareManager->getUsersForShare($share) as $user) { | ||
| if ($share->getSharedBy() !== $user->getUID()) { | ||
| $start = floatval($this->clock->now()->format('U.u')); | ||
| if ($this->cutOffMarkTime === -1.0 || $this->updatedTime < $this->cutOffMarkTime) { |
There was a problem hiding this comment.
So that cutOffMarkTime can be 0 and we can go straight to updating.
By the way, I am not sure whether it makes sense to try to update as many users as possible here instead of flagging them. Do we have more information now compared to later?
| if ($this->cutOffMarkTime === -1.0 || $this->updatedTime < $this->cutOffMarkTime) { | |
| if ($this->cutOffMarkTime === -1.0 || $this->updatedTime <= $this->cutOffMarkTime) { |
There was a problem hiding this comment.
So that cutOffMarkTime can be 0 and we can go straight to updating.
This is already the case.
Do we have more information now compared to later?
Yes, for the single-share-add case, possibly in the future for the single-share delete or transfer cases.
There was a problem hiding this comment.
Now also for the delete case
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
…number of users 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>
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>
Signed-off-by: Robin Appelman <robin@icewind.nl>
61b9ed5 to
356d8f8
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
356d8f8 to
4de187a
Compare
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Uh oh!
There was an error while loading. Please reload this page.