]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg: insert PriorityDispatchers in sorted position 58991/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 16 Jul 2024 21:37:18 +0000 (17:37 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 1 Aug 2024 13:52:42 +0000 (09:52 -0400)
commitdcac0d0927a26756ba4144c8e0b37226e1ff63fe
tree014c662af60953857932bde23c8edde9298d8d34
parent78c918adda19a471c9de21d7ad98e696afa7d6e9
msg: insert PriorityDispatchers in sorted position

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 063d100526e9e5ece31d575568e0910806f8e74d)
src/msg/Messenger.h