ZeroDivisionError in obj/auditor.py while running unit tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Doug Weimer |
Bug Description
I occasionally hit a ZeroDivisionError when running unit tests on obj/auditor.py. The audit_all_objects method runs 'elapsed = time.time() - begin' and then divides by 'elapsed' for logging information. On very fast runs, it's possible for time.time() - begin to be 0. I don't actually think this would show up in a running instance, unit test runs on my VM just seem to run into it every now and then. Relevant code block from obj/auditor.py (begin = time.time() is set earlier in the method):
elapsed = time.time() - begin
'Object audit (%(type)s) "%(mode)s" mode '
'Total errors: %(errors)d, Total files/sec: %(frate).2f , '
'Total bytes/sec: %(brate).2f, Auditing time: %(audit).2f, '
'Rate: %(audit_rate).2f') % {
Changed in swift: | |
milestone: | none → 1.4.7 |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/4574
Review: https:/