]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: reset last_log_sent when clog_to_monitors is updated 39935/head
authorGerald Yang <gerald.yang@canonical.com>
Wed, 3 Mar 2021 04:37:15 +0000 (04:37 +0000)
committerGerald Yang <gerald.yang@canonical.com>
Mon, 8 Mar 2021 08:19:58 +0000 (16:19 +0800)
commit1cf0fa0c689505e0c180c4c4c1bbb156a5e3d1d7
treec1b87d2524ca77b65e1534e0b0063a1f7287235d
parent950e743c3698aeb21089aba2a9e8b6a097145731
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>
src/common/LogClient.cc
src/common/LogClient.h