Repository navigation
Typecast shared mount's storage_id to int as documented + some refactor to avoid similar bugs - #3588
Merged
Merged
Conversation
…3461 Signed-off-by: Frédéric Fortier <[email protected]>
…() all the time thus allowing proper casts to be done Signed-off-by: Frédéric Fortier <[email protected]>
|
@GreenArchon, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @rullzer and @schiessle to be potential reviewers. |
icewind1991
approved these changes
Feb 23, 2017
LukasReschke
approved these changes
Feb 24, 2017
Contributor
Author
|
This (or at least cc511ac which is the bugfix) should also be backported to stable11, as it is affected by #3461 I think @karlitschek is the one to ask? |
Member
|
@icewind1991 Your thoughts on that? I'd tend to agree on that. Any objections? |
Member
|
@icewind1991 your call if this should be backpoted or not. |
Member
|
Backport is fine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3461
Basically both paths of apps/files_sharing/lib/SharedMount.php/getNumericStorageId() returned a string (oups), which caused (maybe among other things) an === comparison to fail in determining if the mounts should be updated in the database. In my ~30 users/desktop clients 11.0.1 instance with ~20 folders shared each, this caused a ~10s extra delay in every page load.
55a37c1 fixes the problem with casts were applicable, and cc511ac refactors "CacheEntry" object creation in Cache.php to use the already existing and wonderful cacheEntryFromData() function which does all casts properly to allow CacheEntry data to return results as documented, instead of semi-regularly casting some of that data.
Feel free to merge any of these commits separately if needed. Also, this should be backported to at least stable11 (as it is affected by #3461) and maybe older versions (haven't tested the bug on them).
Finally, note that I'm not that familiar with (or setup for) web development so the master checkout I did (before these changes) had some test failures (when running autotest) - I didn't know if it was the master failing or some system php packages missing and these changes don't cause more failures, but it should nevertheless be retested before merging.