Skip to content

Conversation

@schiessle
Copy link
Contributor

@schiessle schiessle commented May 12, 2016

This PR introduces flat federated re-shares. This means that if userA@serverA share a file with userB@serverB and userB decided to reshare the file with userC@serverC the share will be created directly between userA and userC. Still both userA and userB will see the share and will be able to manipulate it, unshare it etc.

This should be a nice performance boost for federated re-shares. Because now everyone is directly connected to the source of the file instead of going through multiple ownClouds.

Further this brings the same behavior we already have for internal shares to federated shares.

  • reshare gets created directly by the owner
  • unshare from self gets propagated to both the owner and the initiator of the share
  • unshare form the owner/initiator gets propagated to the recipient and the initiator/owner
  • notification says "you received fileX from userA@serverA on behalf of userB@serverB" so that you know who shared the file with you
  • propagate permission changes
  • fall-back for federated re-shares with older ownClouds
  • adjust unit tests

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @nickvergessen, @icewind1991 and @LukasReschke to be potential reviewers

@schiessle schiessle force-pushed the federated_reshare branch 2 times, most recently from 83ebc1f to c21ad0a Compare May 17, 2016 10:22
@schiessle
Copy link
Contributor Author

schiessle commented May 17, 2016

This pull request is feature complete. Please start to test it and review it... Ignore the failing tests for now. I will fix them.

Basically you can test every cracy re-share activity of federated shares you can think of 😉

Also enable the activity and notification app to check their output.

cc @PVince81 @nickvergessen @rullzer

@schiessle schiessle force-pushed the federated_reshare branch 2 times, most recently from 30a1bc7 to 77f2775 Compare May 18, 2016 12:09
@rperezb
Copy link

rperezb commented May 18, 2016

@SergioBertolinSG can you please create a issue on the qa repo so that we track the qa process for thix, thx

@rullzer
Copy link
Contributor

rullzer commented May 18, 2016

AWESOME stuff @schiesbn!
Looks good so far. Will have more in depth look later!

@schiessle schiessle force-pushed the federated_reshare branch from 7cd1c75 to c0b416c Compare May 18, 2016 14:31
@SergioBertolinSG
Copy link
Contributor

SergioBertolinSG commented May 19, 2016

A question, is this expected or not?:
steps (in all the steps the fed shares are accepted):

  1. Having three servers, A, B and C with three users, userA, userB and userC each.
  2. userA shares a file to userB and userB to userC.
  3. userB deletes the file. (userC is still seeing the share).
  4. userA shares again the same file with userB.
  5. userB shares again that file with userC.

Observed: userC has now the file twice, second one with (2). Shouldn't him have only one file?

@SergioBertolinSG
Copy link
Contributor

Having a middle server with an old version makes shares not flat. Is this ok? Only flat shares when all server involved have this patch?

@schiessle schiessle force-pushed the federated_reshare branch from c0b416c to f339729 Compare May 19, 2016 12:39
@schiessle
Copy link
Contributor Author

Having a middle server with an old version makes shares not flat. Is this ok? Only flat shares when all server involved have this patch?

Yes, for old servers (or servers who also implement federated shares but not the flat re-shares) we fall back to the old behavior.

@schiessle
Copy link
Contributor Author

schiessle commented May 19, 2016

  1. Having three servers, A, B and C with three users, userA, userB and userC each.
  2. userA shares a file to userB and userB to userC.
  3. userB deletes the file. (userC is still seeing the share).

correct, because the file is still shared from userA to userC. Same as for local re-shares.

  1. userA shares again the same file with userB.
  2. userB shares again that file with userC.

This should probably fail because the file is already with userC... I will have a look

@SergioBertolinSG
Copy link
Contributor

SergioBertolinSG commented May 19, 2016

A problem found:

steps (in all the steps the fed shares are accepted):

  1. Having three servers, A, B and C with three users, userA, userB and userC each.
  2. userA shares a file to userB and userB to userC.
  3. userB unshares the file (click on the trashbin in sharing list.
  4. Using userB refresh browser, in the sidebar click on sharing.

Observed: File is still appears as shared (but it was unshared, it doesn't appear in server C).

@schiessle schiessle force-pushed the federated_reshare branch from ad1f1a7 to 5c38b45 Compare May 19, 2016 13:49
@schiessle
Copy link
Contributor Author

userA shares again the same file with userB.
userB shares again that file with userC.

This should probably fail because the file is already with userC... I will have a look

Should be fixed now.

@schiessle
Copy link
Contributor Author

Observed: File is still appears as shared (but it was unshared, it doesn't appear in server C).

should be fixed... @SergioBertolinSG please re-try, thanks!

@SergioBertolinSG
Copy link
Contributor

userA shares again the same file with userB.
userB shares again that file with userC.
This should probably fail because the file is already with userC... I will have a look
Should be fixed now.

I'm seeing the same behaviour, file added again with (2).

@SergioBertolinSG
Copy link
Contributor

Observed: File is still appears as shared (but it was unshared, it doesn't appear in server C).
should be fixed... @SergioBertolinSG please re-try, thanks!

Still happening, userB unshares, but it comes back to the list.

@schiessle
Copy link
Contributor Author

I'm seeing the same behaviour, file added again with (2).

Just tried it again and can no longer re-produce it. Are you sure that you updated all three servers to the latest version of this branch? The last commit should be c8c213a

This is how it looks for me if userB tries to share the file again with userC:

1

@SergioBertolinSG
Copy link
Contributor

Yes, three servers are in the last commit. Do they need to be fresh installations?

@schiessle
Copy link
Contributor Author

Yes, three servers are in the last commit. Do they need to be fresh installations?

I would try to make sure that no broken db entries or something similar is in the way

@schiessle
Copy link
Contributor Author

Still happening, userB unshares, but it comes back to the list.

I can reproduce it... Will look into it. Seems that I misunderstood your steps yesterday and fixed something different 😉

@SergioBertolinSG
Copy link
Contributor

Mm not sure why it failed last time. After retesting it works fine. ✅

@SergioBertolinSG
Copy link
Contributor

I've found another problem.

  1. Having two servers, A and B with two users, userA and userB each.
  2. userA shares a file to userB.
  3. userB accepts the share and shares it back with userA.
  4. userA accepts the share.

Observed: File is not detected as the same file. It is duplicated.

@schiessle
Copy link
Contributor Author

  1. Having two servers, A and B with two users, userA and userB each.
  2. userA shares a file to userB.
  3. userB accepts the share and shares it back with userA.
  4. userA accepts the share.

Observed: File is not detected as the same file. It is duplicated.

fixed, please try again... Thanks!

@SergioBertolinSG
Copy link
Contributor

Works now 👍

@schiessle
Copy link
Contributor Author

@PVince81 time for the final review... 😄

@PVince81
Copy link
Contributor

We already went through the code together yesterday, so I only reviewed the additional commits. All looks good 👍

@PVince81
Copy link
Contributor

@schiesbn ah, can you rebase and solve the conflicts ?

@schiessle schiessle force-pushed the federated_reshare branch from 752b6a1 to ca47555 Compare May 20, 2016 12:54
@schiessle
Copy link
Contributor Author

rebased, but I didn't had any merge conflicts...

@PVince81
Copy link
Contributor

Yeah, local git is sometimes more clever/efficient than Github. Probably Github is more cautious.

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 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.

7 participants