-
Notifications
You must be signed in to change notification settings - Fork 158
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
feat: VFolder trash bin #835
Conversation
6131aa3
to
dc8d30c
Compare
dc8d30c
to
4fd6dd7
Compare
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.
We need retention period feature for trash bin. Manager creates a timer for a function which looks for vFolders staying more than designated period at the trash bin and purging them automatically.
TODO
|
…feature/vfolder-trash-bin
src/ai/backend/manager/defs.py
Outdated
@@ -72,6 +72,7 @@ class LockID(enum.IntEnum): | |||
LOCKID_SCALE_TIMER = 193 | |||
LOCKID_LOG_CLEANUP_TIMER = 195 | |||
LOCKID_IDLE_CHECK_TIMER = 196 | |||
LOCKID_STORAGE_TIMER = 197 |
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.
Looks like this LockID is not used anymore.
DELETE_ONGOING = "delete-ongoing" # vfolder is being deleted | ||
DELETE_COMPLETE = "deleted-complete" # vfolder is deleted | ||
PURGE_ONGOING = "purge-ongoing" # vfolder is being removed permanently | ||
# PURGE_COMPLETE = "purged-complete" # vfolder is removed permanently |
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.
Please remove commented out, unused snippet from the file.
VFolderOperationStatus.MOUNTED, | ||
} | ||
case VFolderAccessStatus.UPDATABLE: | ||
# if UPDATABLE access status is requested, READY and MOUNTED operation statuses are accepted. | ||
# if UPDATABLE access status is requested, only READY operation status is accepted. |
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.
Looks like this comment contradicts with actual implementation.
related issue: #767
1. impl trash bin in vfs storagedelete
API only updates the status column of vfolder table at manager, andpurge
API deletes the real data.DELETE_ONGOING
orPURGE_ONGOING
etc.3. impl storage trash bin checker in manager dispatcher.storage_check_interval_days
in manager's shared_config set the interval of trash bin checker.Q: How should we determine duplicate new created vfolder name if we do not delete actual data in DB?
purge_vfolder
remove the db row and remove the actual vfolder.The name of
DELETED
vfolders can not be used for new created vfolders but the name ofPURGED
vfolders are available.-> Decided to remove
PURGED
vfolder row.