]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: reset last_log_sent when clog_to_monitors is updated 40247/head
authorGerald Yang <gerald.yang@canonical.com>
Wed, 3 Mar 2021 04:37:15 +0000 (04:37 +0000)
committersinguliere <singuliere@autistici.org>
Fri, 19 Mar 2021 17:58:13 +0000 (18:58 +0100)
commite3b3a682d7e7c0ecfc08d1a058bf0c79104a1697
tree34bcce5e5df567fef496ce3db4384700696d017b
parent9cb3956f421feac104d1e6e456290bb2388c68e3
common: reset last_log_sent when clog_to_monitors is updated

When clog_to_monitors is disabled, "last_log" still keeps increasing by
get_next_seq() if OSD writes info to clog

But "last_log_sent" doesn't increase, if we disable clog_to_monitors for
a bit longer and then re-enabling it, the num_unsent could be bigger than
log_queue_size(), it will trigger an assertion in _get_mon_log_message

We need to reset last_log_sent to last_log before updating clog_to_monitors

Signed-off-by: Gerald Yang <gerald.yang@canonical.com>
(cherry picked from commit 294ddf9ba779d40b0bc859e55f5287379c75624f)
src/common/LogClient.cc
src/common/LogClient.h