Project

General

Profile

Feature #8554

Updated by Tom Clegg about 8 years ago

h2. Implementation 

 Trash: 
 # set deadline = now + trash-ttl 
 # Rename abc/{hash} to abc/{hash}.trash.{deadline} 

 Untrash: 
 # Rename the first file named abc/{hash}.trash.* (there might be more than one) to abc/{hash} 

 EmptyTrash: 
 # Walk hierarchy looking for {hash}.trash.* 
 # If deadline < now, delete the file 
 # Log amount of deleted stuff: number of blocks, number of bytes 
 # Log amount of undeleted stuff still in trash: number of blocks, number of bytes 

 Empty-trash goroutine (this part is not specific to unix volumes): 
 # Use one time.Ticker with configurable trash-check interval (default 1 day?) 
 # When ticker fires, empty trash on all volumes 

Back