Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pool: Fix accounting error in repository statistics
Motivation: We pre-calculate the output of 'rep ls -s' by listening for repository change events. We have observed this pre-calculation to claim that we have a negative number of files with a sticky flag. The repository generates change events when sticky flags expire. The change event is generated for each expired sticky flag, however the before and after state inluded in the event is the same for all these notifications. For the code maintaining the repository statistics this is fatal as it will observe the same file changing from sticky to non-sticky several times even when reality two sticky flags were expired in one operation. Modification: Do not include the sticky flag that changed in the notification; it was not used by any listener and if needed it can be extracted by calculsting the difference of the before and after state. Result: Fixed an accounting bug that could cause the output of 'rep ls -s' to be wrong. Target: trunk Request: 2.14 Request: 2.13 Request: 2.12 Require-notes: yes Require-book: no Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Patch: https://rb.dcache.org/r/8925/ (cherry picked from commit 830070e6630db10ae2e35fff3998f66de3cfe3d1)
- Loading branch information