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 until the timestamps start being in the future. For each trash marker, get the modtime and ExpiresAt for the hash; if the data is still old and ExpiresAt is still set, delete it (otherwise do nothing); delete the trash marker in any case. 
 # Get &rarr; check @ExpiresAt@ metadata when retrieving the block. If present, return 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