-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[sharing] fix performance issues #11380
Conversation
f4159b5
to
a2dedbe
Compare
💣 Test FAILed. 💣 |
💣 Test FAILed. 💣 |
28a36ae
to
41592c2
Compare
@owncloud-bot retest this please |
1 similar comment
@owncloud-bot retest this please |
@schiesbn if this is ready for review we can have a guided code review tomorrow 😄 |
yes, let's do this tomorrow |
@owncloud-bot retest this please |
* @param string $shareWith with whom should the item be shared | ||
* @return array with shares | ||
*/ | ||
public function getParents($itemSource, $shareWith = null) { |
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.
Please add a unit test for this
To test:
|
💣 Test FAILed. 💣 Build result: FAILURE[...truncated 7 lines...] > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11380/merge^{commit} # timeout=10Checking out Revision 4784fa3cb0e4c043cc294dde0fd5aa0f83f190e8 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 4784fa3cb0e4c043cc294dde0fd5aa0f83f190e8 > git rev-list f53496f8c74a5de89f1082eba15c77d988670ef3 # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng » sqlite,vm-slave-02Configuration pull-request-analyser-ng » sqlite,vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02Triggering pull-request-analyser-ng » pgsql,vm-slave-02Triggering pull-request-analyser-ng » mysql,vm-slave-02Triggering pull-request-analyser-ng » oci,vm-slave-02Configuration pull-request-analyser-ng » pgsql,vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02pull-request-analyser-ng » pgsql,vm-slave-02 completed with result FAILUREpull-request-analyser-ng » mysql,vm-slave-02 completed with result FAILUREpull-request-analyser-ng » oci,vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second:bomb: Test FAILed. :bomb: |
41592c2
to
866946f
Compare
@PVince81 please try again, problem should be solved. I also added a unit test and a additional comment to explain the if statement |
Fixes #11510 |
👍 tested, works well. Also did a bit of regression testing for sharing and didn't find any issues. Needs a second reviewer @jnfrmarks @LukasReschke @MorrisJobke |
@@ -49,6 +49,9 @@ public function getFilePath($itemSource, $uidOwner) { | |||
$path = $this->path; | |||
$this->path = null; | |||
return $path; | |||
} else { | |||
$path = \OC\Files\Filesystem::getPath($itemSource); | |||
return $path; | |||
} | |||
return false; |
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.
As far I can see the false will never be returned here - if so, then why not remove it?
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.
Also the PHPDoc of the interface is stating that this function can return false which is wrong now.
👍 if my comments have been addressed. |
866946f
to
527e1d0
Compare
💣 Test FAILed. 💣 Build result: FAILURE[...truncated 7 lines...] > git fetch --tags --progress https://github.com/owncloud/core.git +refs/heads/:refs/remotes/origin/ > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10 > git config remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10 > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/11380/merge^{commit} # timeout=10Checking out Revision b479c29b4aba8703f1e582de5623dd3e9fddd10a (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f b479c29b4aba8703f1e582de5623dd3e9fddd10a > git rev-list a704be688799333259a1efba74a82a5edab0dad5 # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng » sqlite,vm-slave-02Configuration pull-request-analyser-ng » sqlite,vm-slave-02 is still in the queue: Waiting for next available executor on vm-slave-02Touchstone configurations resulted in FAILURE, so aborting...Started calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 1 second:bomb: Test FAILed. :bomb: |
Jenkins seems to be broken, but tests passed locally. |
[sharing] fix performance issues
stable7: 088879c...f4c91f0 |
💣 Test FAILed. 💣 Build result: FAILURE💣 Test FAILed. 💣 |
The inspection completed: 10 new issues, 9 updated code elements |
527e1d0 is part of this pull request. Not sure what the difference should be. BTW, you also need this PR: #11542, this fixes a regression from this PR. (but this affects only unit tests and non-file shares) Also master works just fine for me... If you still have problems on master please open a issue with more information. |
Fix performance issue when the user has folders with many files and want to share a new one.
#10588