-
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
Take submount etag into account for folder etags #20439
Conversation
bb78235
to
34ed522
Compare
@nickvergessen can you smash this? |
Smashed: ✅ |
I think we can try to get this in as it is currently, there is still some optimizations we can do on top of this (remove the files_external propagation logic) but in current state it should improve the performance without regressions. cc @PVince81 |
@icewind1991 do you mind writing a more detailed explanation of the etag propagation change as discussed last week ? I'd also like to know what @DeepDiver1975 thinks. While I agree that this brings a perf improvement and simplifies the etag propagation code, I'm a bit worried what happens if one user has 100+ received shared folders (mount points) and for every PROPFIND the computed etag needs to compute all of them. |
|
||
namespace OC\Files\Cache; | ||
|
||
class Propagator { |
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.
PHPDoc ? What does this propagator propagate and how ?
Raised #20521 to provide Webdav-based etag propagation tests, as discussed last week. |
Modern hardware has no problem calculating tens of thousands md5 hashes a second for strings of a few hundred characters, any overhead from the hashing will be insignificant compared to the other overhead that comes with 100+ shares/mounts |
and if I understand well, the mounts are already resolved and the resolution is something we already did in the past, so there should be no performance regression there ? |
Correct |
Currently when propagating etags (and mtimes) we need to propagate all the way up to the root for all users who have access to the file which is complicated and expensive. This changes it to only propagate to the root of the storage (for the owner of the file) making the etags storage in the database storage-specific etags. When reading the etag for a folder in |
Smashbox tests all passed. |
I'm not sure whether we should merge it now or wait for @SergioBertolinSG's Webdav level etag propagation tests ? @DeepDiver1975 what do you think ? On the other hand having it merged early gives an opportunity for more developer testing. @icewind1991 should this be "To review" or is anything open ? |
This is good to merge in my opinion |
I'm ok with this 👍 |
The only problem with this is, that you change it from "write" to "read"? Now we need to always resolve this when reading the etag, as opposed to only when we change something, which happens way less? |
Yes, but the logic we need to do on read is simple compared to the very complex logic we had on write and the cost is neglectable |
Would be good to have integration tests too #20521 |
@nickvergessen @DeepDiver1975 can this be merged? |
this replaces shared etag propagation
8250e3a
to
a95d4c2
Compare
|
@DeepDiver1975 can we merge this ? The smashbox tests are almost ready but depend on the sync client version fix for owncloudcmd. |
The smashbox test has been merged. |
@DeepDiver1975 @nickvergessen can the be merged? |
I will smash a fresh master with this being merged in, so we can test it with all the latest magic, |
👍 |
Take submount etag into account for folder etags
Smashed again and passed: ✅ 👍 |
This removes the need to do cross-storage etag propagation