mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_ops
_calculate_ops relying on a config which can be modified on the fly will cause a bug. e.g.
- A file has 20 objects and filer_max_purge_ops config was 10.
- calling PurgeQueue::_execute_item and _calculate_ops returns 10, so ops_in_flight add 10.
- adjust filer_max_purge_ops to 20 on the fly
- calling PurgeQueue::_execute_item_complete and _calculate_ops returns 20, so ops_in_flight dec 20.
- since ops_in_flight is uint64, this cause an overflow which makes ops_in_flight far more greater than max_purge_ops and can't go back to a reasonable value.
filer_max_purge_ops will still work when _do_purge_range, so it's ok to ignore it here.
#1 Updated by yixing hao about 1 year ago
When increasing filer_max_purge_ops on a pacific version mds, pq_executing_ops/pq_executing_ops_high_water of purge_queue becomes abnormal immediately, but I think it also applies to the main branch.
ceph daemon mds.x perf dump | jq .'purge_queue'