]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg: insert PriorityDispatchers in sorted position 61507/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 16 Jul 2024 21:37:18 +0000 (17:37 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 24 Jan 2025 16:52:53 +0000 (11:52 -0500)
commit916eba3a31d4aaf6e8cd4dc569565783dda511f0
tree3f95e766e4ec3e57273adda7a39387dcae167967
parente1704cad1d0cb88eb78a94e5429963d75831314b
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