`interval` setting is inconsistent between db replicators and object replicator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Not sure which way it *should* behave, but the object replicator will always sleep for `interval` after each cycle [1] while the account/container replicators will sleep for `interval - elapsed`, and only if `interval > elapsed`. As a direct descendant, the reconstructor behaves like the object replicator [3]. These should probably be consistent.
FWIW, it looks like the db replicators used to behave like the object one [4] -- not sure on the justification, though.
[1] https:/
[2] https:/
[3] https:/
[4] https:/
I think it all went south here:
https:/ /review. openstack. org/#/c/ 171170/
Pete was right, we shouldn't call two things interval that do two different things.
Christian was right, run_pause or interval are both reasonable and orthogonal options.
I think all daemons should have both:
sleep(max( run_pause, interval - elapsed))
I *personally* would run with:
run_pause = 0
interval = 30
But if you prefer a little-bit of sleep regardless and no fast cycles, you should be welcome to
run_pause = 30
interval = 300
The real question is how to detangle it now. Do we need some crufty code when the conf doesn't have both to default to one or the other depending on what the current implementation was currently doing and then *documenting* that?
I'd much rather just consider the inconsequential behavior difference a *bug* - add config options for both with reasonable defaults - document the new consistent behavior - and throw a ling in the Changelog.