Skip to content
Snippets Groups Projects
  • Vincent Petry's avatar
    e0af5263
    Allow chunk GC mtime tolerance for unfinished part chunks · e0af5263
    Vincent Petry authored
    Whenever part chunks are written, every fwrite in the write loop will
    reset the mtime to the current mtime. Only at the end will the touch()
    operation set the mtime to now + ttl, in the future.
    
    However the GC code is expecting that every chunk with mtime < now are
    old and must be deleted. This causes the GC to sometimes delete part
    chunks in which the write loop is slow.
    
    To fix this, a tolerance value is added in the GC code to allow for
    more time before a part chunk gets deleted.
    Allow chunk GC mtime tolerance for unfinished part chunks
    Vincent Petry authored
    Whenever part chunks are written, every fwrite in the write loop will
    reset the mtime to the current mtime. Only at the end will the touch()
    operation set the mtime to now + ttl, in the future.
    
    However the GC code is expecting that every chunk with mtime < now are
    old and must be deleted. This causes the GC to sometimes delete part
    chunks in which the write loop is slow.
    
    To fix this, a tolerance value is added in the GC code to allow for
    more time before a part chunk gets deleted.