Project

General

Profile

Feature #8556

Updated by Tom Clegg about 8 years ago

h2. Implementation 

 # Trash &rarr; set @<ExpiresAt>123</ExpiresAt>@ *and* create a marker (just an empty blob) named @trash/000000000123/hash@ 
 # Untrash &rarr; unset @ExpiresAt@ *and* delete trash/000000000123/hash 
 # EmptyTrash &rarr; index @trash/*@ in order. order until the timestamps start being in the future. For each trash marker with @deadline <= now@: 
 #* Look up marker, get the modtime and ExpiresAt for the data block itself. 
 #* If hash; if the data is _still_ still old and ExpiresAt is _still_ still set, delete the data block it (otherwise do nothing). 
 #* Delete nothing); delete the trash marker (regardless of whether the data block was deleted). in any case. 
 # Get, Mtime, Touch, IndexTo &rarr; check @ExpiresAt@ metadata. If present, return/skip as if the block was not found at all. 

 h2. Tests 

 Ensure {Put; Trash; Put} results in ExpiresAt being cleared. This might happen by itself, or we might need to use SetBlobMetadata to clear the metadata explicitly after writing each block. 

 Ensure the Azure server stub behaves the same as the real Azure server wrt any feature we're relying on for this. 

 h2. Future work (defer) 

 When doing a full index (prefix=""), build two trash lists: a list of blocks whose metadata indicates that they are trash, and a list of trash markers. After sending the index response and closing the connection, delete any trash markers whose block metadata indicates that they are not trash. 

Back