Skip to content

squid: msg: insert PriorityDispatchers in sorted position#58991

Merged
SrinivasaBharath merged 1 commit intoceph:squidfrom
cbodley:wip-67307-squid
Oct 16, 2024
Merged

squid: msg: insert PriorityDispatchers in sorted position#58991
SrinivasaBharath merged 1 commit intoceph:squidfrom
cbodley:wip-67307-squid

Conversation

@cbodley
Copy link
Contributor

@cbodley cbodley commented Aug 1, 2024

backport tracker: https://tracker.ceph.com/issues/67307


backport of #58631
parent tracker: https://tracker.ceph.com/issues/66336

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

avoid calling stable_sort() after every insertion by inserting directly
into the sorted position. use lower_bound() to insert at the head and
upper_bound() to insert at the tail

this generally only happens during startup so isn't a performance
problem, but std::stable_sort() was triggering strange valgrind warnings
for "Mismatched free() / delete / delete []" when it allocates a
temporary buffer

Fixes: https://tracker.ceph.com/issues/66336

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 063d100)
@cbodley cbodley requested a review from a team as a code owner August 1, 2024 13:52
@cbodley cbodley added this to the squid milestone Aug 1, 2024
@cbodley cbodley requested review from a team August 1, 2024 13:54
@rishabh-d-dave
Copy link
Contributor

This PR is under test in https://tracker.ceph.com/issues/67948.

@SrinivasaBharath SrinivasaBharath merged commit b55fc51 into ceph:squid Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants