fix(workspace): Use filecache existance for checking if readme exists#6891
Merged
juliusknorr merged 3 commits intomainfrom Mar 18, 2025
Merged
fix(workspace): Use filecache existance for checking if readme exists#6891juliusknorr merged 3 commits intomainfrom
juliusknorr merged 3 commits intomainfrom
Conversation
5 tasks
d42f63e to
dd47c83
Compare
blizzz
approved these changes
Feb 12, 2025
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Julius Knorr <jus@bitgrid.net>
dd47c83 to
af11b18
Compare
Member
Author
|
/backport to stable31 |
Member
Author
|
/backport to stable30 |
Member
Author
|
/backport to stable29 |
This was referenced Mar 18, 2025
2 tasks
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.
Alternative to #5963
While i initially pushed this fix to the earlier PR i think it would be enough in its own without affecting mobile app behaviour. We save the most expensive step to check file existence on the actual remote storage by just using the file cache entry.
This improves the situation for any external storage as well as federated shares by saving 4 checks on the remote for file existence, only if we know a file we will access it to get the content.
This of course has one limitation, that the file needs to be known to Nextcloud already, but should be fine for most of the cases.
Todo from chat:
1738924269.607566 [0 unix:/var/run/redis/redis-server.sock] "GET" "8b16b520c496b13f920772e0b509487a/text_workspace175301_549b3998cd6b2f08d58c4033e85a084a"
1738924269.617739 [0 unix:/var/run/redis/redis-server.sock] "SETEX" "8b16b520c496b13f920772e0b509487a/text_workspace175301_549b3998cd6b2f08d58c4033e85a084a" "3600" """"
Turns out the file was empty, so the check at
text/lib/DAV/WorkspacePlugin.php
Lines 92 to 96 in 40e63bb
Might be a corner case, but guess filing an issue makes sense?