Skip to content

Fix etag propagation for single file shares - #17082

Merged
DeepDiver1975 merged 3 commits into
masterfrom
shared-etag-propagate-file
Jun 26, 2015
Merged

DeepDiver1975 merged 3 commits into
masterfrom
shared-etag-propagate-file

Conversation

@icewind1991

Copy link
Copy Markdown
Contributor

To test:

  • create 2 users user1 and user2
  • create a text file as user1 and share it with user2
  • check the root etag for user2
  • update the text file as user1
  • check if the root etag for user2 has been changed

cc @DeepDiver1975 @PVince81

@icewind1991

Copy link
Copy Markdown
Contributor Author

8.1? breaks sync

@PVince81

Copy link
Copy Markdown
Contributor

Wow, infinite loop!

@icewind1991 please have a look

@icewind1991
icewind1991 force-pushed the shared-etag-propagate-file branch from aaabf64 to 3712628 Compare June 23, 2015 12:52
@icewind1991

Copy link
Copy Markdown
Contributor Author

Added a unit test and changed to approach to prevent the infinite loop

@PVince81 PVince81 added this to the 8.1-current milestone Jun 23, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this missing ? Or is it an additional optimization ?
Or required for this fix ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required for this fix, also small optimization

@PVince81

Copy link
Copy Markdown
Contributor

@icewind1991 mind explaning the change a little bit ? (the commit comment is a bit sparse)
Thanks.

@PVince81

Copy link
Copy Markdown
Contributor

It is also unclear to me why single file share require special handling, and also I don't understand in what way your change makes it work.

@PVince81

Copy link
Copy Markdown
Contributor
  • TEST: propagation user1->user2 with file in root: etag of root changed
  • TEST: propagation user2->user1 with file in root: etag of root changed
  • TEST: propagation user1->user2 with file in subdir: etag of root + subdir changed
  • TEST: propagation user2->user1 with file in subdir: etag of root + subdir changed

@icewind1991

Copy link
Copy Markdown
Contributor Author

It is also unclear to me why single file share require special handling, and also I don't understand in what way your change makes it work.

Before this etag propagation hooks into the change propagation (which is responsible for updating etag/mtime for parent folders) but the change propagator only emits hooks for the parent folders of changed files. This is nice with shared folders or more complex share setups but doesn't work if the file changed itself is shared

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that the part that detects if this is a file share ?
Will the change also affect folder shares ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if the subject of the write hook has a share entry.

So only for single file shares

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding a small inline comment for that ?
Thanks 😄

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@icewind1991 Please add the comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@PVince81

Copy link
Copy Markdown
Contributor

👍

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@icewind1991 please rebase for oracle ci - thx

@icewind1991
icewind1991 force-pushed the shared-etag-propagate-file branch from 3712628 to c87ab65 Compare June 24, 2015 16:16
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@ghost

ghost commented Jun 25, 2015

Copy link
Copy Markdown

🚀 Test PASSed.🚀
chuck

@PVince81

Copy link
Copy Markdown
Contributor

@schiesbn @nickvergessen @DeepDiver1975 second reviewer please

@DeepDiver1975

Copy link
Copy Markdown
Contributor

👍

DeepDiver1975 added a commit that referenced this pull request Jun 26, 2015
Fix etag propagation for single file shares
@DeepDiver1975
DeepDiver1975 merged commit 9558562 into master Jun 26, 2015
@DeepDiver1975
DeepDiver1975 deleted the shared-etag-propagate-file branch June 26, 2015 10:36
@PVince81

PVince81 commented Aug 3, 2015

Copy link
Copy Markdown
Contributor

Regression: #18034

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants