Skip to content
  • Sofia Papagiannaki's avatar
    Fix pithos purging accounting · 0b752cff
    Sofia Papagiannaki authored
    Refs: #3442
    Refs: #1733
    
    Pithos has two different version accounting
    policies:
    * free: do not include object history version size 
    to the total account usage
    * debit: include object history version size to 
    the total account usage
    This configurable by
    PITHOS_BACKEND_FREE_VERSIONING setting.
    
    Pithos delete container function purges 
    the history versions of the including objects.
    and should send to the quota holder component
    the released disk space *only*  
    in the case of debit version accounting policy.
    
    Also the purging function used to return 
    the negative of the computed released disk space 
    but to the quotaholder component was sent 
    its negative.
    So, erroneously, the released disk space was
    added to the total quota usage.
    
    Provide tests for the following distinct cases:
    * free version accounting policy (PITHOS_BACKEND_FREE_VERSIONING=True) 
    and `auto` container versioning policy
    * free version accounting policy
    (PITHOS_BACKEND_FREE_VERSIONING=True) 
    and `none` container versioning policy
    * debit version accounting policy
    (PITHOS_BACKEND_FREE_VERSIONING=False) 
    and `auto` container versioning policy
    * debit version accounting policy(PITHOS_BACKEND_FREE_VERSIONING=False) 
    and `none` container versioning policy
    0b752cff