-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add listener and interfaces to allow versions migration across storage #44187
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
Add listener and interfaces to allow versions migration across storage #44187
Conversation
8273c37 to
ebd56af
Compare
ebd56af to
01a40ea
Compare
3bed871 to
975ef17
Compare
404bae4 to
65bbca7
Compare
a9bbdea to
452a63e
Compare
4825f46 to
d3b22fd
Compare
b3224be to
5cacb07
Compare
5cacb07 to
363dd98
Compare
363dd98 to
61aac1f
Compare
14ef689 to
b2cf644
Compare
| /** @var Folder $source */ | ||
| foreach ($target->getDirectoryListing() as $targetChild) { | ||
| if ($event instanceof NodeCopiedEvent) { | ||
| $sourceChild = $source->get($targetChild->getName()); |
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.
is there any reason for not using the same method as used for renames.
The "rename logic" gets the nodes from a getDirectoryListing per folder while this has to do a get for every child. So the "rename logic" should be significantly more efficient.
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.
I think it failed in some way, let me finish testing on the groupfolder side, and I'll try it again.
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.
Right, in case of copy, we need to do the tree walking to have the id of the source in any case, so it won't improve performances to cache the nodes.
emoral435
left a comment
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.
small nitpicks, but overall good PR :)
0150a64 to
6430699
Compare
56d9a89 to
ba93fbb
Compare
…igration across storages Signed-off-by: Louis Chemineau <[email protected]>
ba93fbb to
369274c
Compare
Add new API to allow migrating version across backends. For example when moving a file to a groupfolder.
IVersionsImporterBackendand implement it inLegacyVersionsBackendThe equivalent Groupfolder PR is here: nextcloud/groupfolders#2860