« Previous | Next » 

Revision 0a92ff85

ID0a92ff85e17b0121bedc867d8c56b704f1821a55

Added by Sofia Papagiannaki over 8 years ago

Fix pithos purging accounting

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

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences