]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg: insert PriorityDispatchers in sorted position
authorCasey Bodley <cbodley@redhat.com>
Tue, 16 Jul 2024 21:37:18 +0000 (17:37 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 16 Jul 2024 21:42:38 +0000 (17:42 -0400)
commit063d100526e9e5ece31d575568e0910806f8e74d
tree0433e9bd65fd8bba2557969e45975eaf223a94ad
parentf19d3f83ca4dd8e943e3c38dd28a8d4be8582857
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>
src/msg/Messenger.h