Project

General

Profile

Actions

Bug #58008

closed

mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_ops

Added by yixing hao over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

_calculate_ops relying on a config which can be modified on the fly will cause a bug. e.g.

  1. A file has 20 objects and filer_max_purge_ops config was 10.
  2. calling PurgeQueue::_execute_item and _calculate_ops returns 10, so ops_in_flight add 10.
  3. adjust filer_max_purge_ops to 20 on the fly
  4. calling PurgeQueue::_execute_item_complete and _calculate_ops returns 20, so ops_in_flight dec 20.
  5. 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.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #58253: quincy: mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_opsResolvedDhairya ParmarActions
Copied to CephFS - Backport #58254: pacific: mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_opsResolvedDhairya ParmarActions
Actions

Also available in: Atom PDF