-
Notifications
You must be signed in to change notification settings - Fork 159
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
Advanced vfolder deletion features (aka trash bin) #767
Comments
Let's implement this first.
|
Most of the essential features will be covered by #835 but we still need to implement a timer which periodically purges long-lasting VFolders in trash bin. |
@agatha197 @lizable @yomybaby |
Main idea
We can now determine the status of vfolders after #713.Let's extend this feature for advanced deletion status such as
DELETE-PENDING
,DELETE-ONGOING
orDELETE-ERROR
.DELETE-PENDING
vfolders by the owner of the vfolder or any admin.It is recommended that deletion job change the status of vfolder and save the result of job at audit log rather purge the row in DB.
Updated (2023-10-04)
In 24.03, vfolder trash bin feature is implemented. Now vfolder delete API just update the status of vfolder to
DELETE_COMPLETE
.We need to implement a trash bin timer which periodically purges long-lasting VFolders in trash bin as @kyujin-cho mentioned.Updated (2024-02-06)
We will refine the state transition as follows, with better namings:
Remove the
PURGE_ONGOING
state and perform the actual filesystem-level removal inDELETE_ONGOING
.The normal vfolder list should display
READY
vfolders only.The trash bin should display
DELETE_PENDING
andDELETE_ONGOING
vfolders only.*DELETE_PENDING
: Users can no longer mount this vfolder when creating new sessions.DELETE_COMPLETE
vfolders are not shown in the WebUI but only in the CLI and the control panel.* Currently the enum value is "delete*d*-complete". The typo should be fixed with an explicit migration.Let's introduce the
status_history
column in thevfolders
table, just like refactor: Replacesessions
,kernels
'sstatus_history
's typemap
withlist
#1662.Before:
After:
Additional technical considerations
storage-proxy* Limit the number of concurrent vfolder removal operations in the filesystem.
When requested vfolder removal twice or more times for a same vfolder, continue the first operation without spawning multiple removal jobs.
Report the completion of vfolder removal to the manager in an asynchronous way. (via the event bus?)
When cancelled due to shutdown of the service in the middle of operations, gracefully cease the operation. This cancellation shouldn't be treated as
DELETE_ERROR
but the state must be keptDELETE_ONGOING
for continuation after restart.* In the future, we could introduce the reconcilation loop design here.manager* When the manager is restarted, restart the delete operations against
DELETE_ONGOING
vfolders. It should be safe to make multiple duplicate removal requests to the same vfolder.Extend
clean-history
implementation to "purge" the vfolders in theDELETE_COMPLETE
state.The text was updated successfully, but these errors were encountered: