Skip to content
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

Duplicate deleted files on the server. #10265

Closed
sagitariozod opened this issue Jul 17, 2018 · 5 comments
Closed

Duplicate deleted files on the server. #10265

sagitariozod opened this issue Jul 17, 2018 · 5 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: sharing feature: trashbin technical debt

Comments

@sagitariozod
Copy link

Nextcloud Server Version: 13.0.4 Stable.
Server: Ubuntu 18.04 LTS

Hello, I have a question, it seems, when a user (user1) shares a folder with another user (user2), all files and folders that the user2 places within the shared folder (with the desktop client), the space used adds to the user1 and in the folders of the server there is a single copy of this files and folders inside the folder corresponding to the user1. Internally Nextcloud maintains the necessary "links" to know what folders each user has access to.
If user2 deletes a folder or file, the following occurs, both users have access from the nextcloud web application to the deleted files and folders from the Deleted files option.
The problem is the following, when for example the user2 deletes a folder or file, it is physically duplicated in the folders of each user in the server. This means that, if you work constantly with considerable amounts of data (hd videos, etc.), for the server is a high workload (unnecessary in my opinion), since when you delete a folder of eg 20 GB , at that moment the server starts to copy the deleted folder to the user2 folder on the server, making a high use of resources (CPU, hard disk, ram, ..., unnecessary as I said above).
On the other hand, in the case that I raise (hd videos with constant editions and erasures), the consumption of hard disk is also excessive due to the duplication of files and folders of deleted files, having to empty the trash (deleted files) constantly (this it would not be a problem but it does not make it too historic).
In my opinion, this mode of operation is not too optimal, I think it would be better not to duplicate deleted files and folders and to manage it like non-deleted files, with "logical links" in the database. This would optimize the use of resources and would not be so high in hard disk space consumption.

If this situation is reproduced to a considerable number of users, neither too high (15 users) the consumption of resources is disproportionate.

Apologies, my English is very bad, I hope you understand.

Similar problems:
#3502

Thank you very much.
Greetings.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #6941 (Create file and favourite it duplicates the entry), #220 (Feature Request: Prevent duplicate uploads server-side), #8301 (Shared files are duplicated when moved to subdir), #3206 (Add option to copy/duplicate files), and #4869 (Duplicate files in display after creation).

@MorrisJobke
Copy link
Member

Hello, I have a question, it seems, when a user (user1) shares a folder with another user (user2), all files and folders that the user2 places within the shared folder (with the desktop client), the space used adds to the user1 and in the folders of the server there is a single copy of this files and folders inside the folder corresponding to the user1. Internally Nextcloud maintains the necessary "links" to know what folders each user has access to.

This is the correct behavior.

The problem is the following, when for example the user2 deletes a folder or file, it is physically duplicated in the folders of each user in the server. This means that, if you work constantly with considerable amounts of data (hd videos, etc.), for the server is a high workload (unnecessary in my opinion), since when you delete a folder of eg 20 GB , at that moment the server starts to copy the deleted folder to the user2 folder on the server, making a high use of resources (CPU, hard disk, ram, ..., unnecessary as I said above).

It only puts a copy to the owner and the deleting user. So that both of them can undo the deletion. Otherwise the deleting user can undo the deletion or the owner can't undo it.

In my opinion, this mode of operation is not too optimal, I think it would be better not to duplicate deleted files and folders and to manage it like non-deleted files, with "logical links" in the database. This would optimize the use of resources and would not be so high in hard disk space consumption.

We know that and want to unify the trash bin on this side. We try to improve on this and a first step is to move it over to DAV - see #9202.

@rullzer Do we have a ticket for this migration?

@rullzer
Copy link
Member

rullzer commented Jul 17, 2018

There is no migration yet. Or a real overview ticket for that matter. The DAV endpoint has nothing to do with how the files are handled internally.

I need spend more time with @icewind1991 to come up with a proper solution ;)

@jospoortvliet
Copy link
Member

That's what the conference is for 😸

@szaimen
Copy link
Contributor

szaimen commented May 21, 2021

I am going to close this since there doesn't seem to be a lot of interest (no upvotes) and no respond since around 2 years. Please reopen if you still want to implement this.

@szaimen szaimen closed this as completed May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: sharing feature: trashbin technical debt
Projects
None yet
Development

No branches or pull requests

7 participants