Skip to content

Commit 35cf0f6

Browse files
committed
dmclock/.../dmclock_server: do not clean clients with requests
PriorityQueueBase::do_clean() shouldn't remove ClientRec instances which still have queued requests. Otherwise, very low priority clients might end up having requests actually lost, which shouldn't be possible. In the OSD, this resulted in PGRecovery items being lost if queued with background_best_effort while expanding a cluster. Such items can legitimately sit in the queue for a long period of time as they represent background data migration which is allowed to be starved by an aggressive client workload. Dropping the items broke an assumption in the OSD that all items enqueued would eventually be dequeued resulting in resources being leaked. Fixes: https://tracker.ceph.com/issues/61594 Signed-off-by: Samuel Just <[email protected]>
1 parent 0938a59 commit 35cf0f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dmclock/src/dmclock_server.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,8 @@ namespace crimson {
12411241
if (erase_point > 0 || idle_point > 0) {
12421242
for (auto i = client_map.begin(); i != client_map.end(); /* empty */) {
12431243
auto i2 = i++;
1244-
if (erase_point &&
1244+
if (!(i2->second->has_request()) &&
1245+
erase_point &&
12451246
erased_num < erase_max &&
12461247
i2->second->last_tick <= erase_point) {
12471248
delete_from_heaps(i2->second);

0 commit comments

Comments
 (0)