mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 03:55:58 +03:00
[GH-ISSUE #607] Deleting nodes does not get rid of underlying filesystem folders #478
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#478
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bluekitedreamer on GitHub (Mar 26, 2024).
Original GitHub issue: https://github.com/ciur/papermerge/issues/607
Originally assigned to: @ciur on GitHub.
First and foremost, this app is sick awesome job man. I've been playing with it the last few hours and hooking a few other apps to it's API for secondary storage, search, and organization.
Description
Instead of using docker volumes I map the core_app folder directory to a mount on the filesystem using docker mounts, for various reasons. When deleting nodes/files in papermerge I noticed that the folders created for the nodes are still present.
Info:
The folder structure will still persist. For example below is a tree on the core_app folder. Is this expected functionality? (see code below)
side question
Also I'm curious as to the reasoning of the folder structures. I can understand the need to provide the GUID folder for uniqueness of uploaded files, file versioning, merging etc, but the extra folder structures on top of the GUID folder seems weird to me. My line of questioning is not insinuating or implying the implementation is wrong, if it works, it ain't stupid. I'm simply curious here.
It seems to me applying only the GUID folder should be sufficient, and would allow for easier manual decorruption in the event something catastrophic happened and you needed to piece an instance back together.
@ciur commented on GitHub (Mar 26, 2024):
Thank you for opening the ticket.
Regarding your question about extra folder on top of GUID folder.
The reason is to reduce number of file system nodes (files or folders) in a specific folder.
Example: let's say you have 120,000 pages; then with just GUID folder, the
pagesfolder will contain 120,000 entries! The problem is that usually there is a limit of number of subfolders on fiven file system. By adding one extra folder, with two digits of the UUID, the limitation is reduced by factor of 256. Thus if you have 120,000 pages, on the file system there will be max 120,000 / 256 ~ 468 folders.@bluekitedreamer commented on GitHub (Mar 27, 2024):
Gotcha, you're shooting for maximum comptability all around here, makes sense, I like it.
I'd normally be the advocate of lets just change the OS limitation, but as an app developer trying to support as many situations as possible I understand the mindset and decision.
@bluekitedreamer commented on GitHub (Mar 27, 2024):
Also I had the version wrong I'm using 3.1 not 3.0.1, I fixed it above