]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cls/journal: skip disconnected clients when finding min_commit_position 44692/head
authorMykola Golub <mgolub@suse.com>
Fri, 14 Jan 2022 18:21:29 +0000 (18:21 +0000)
committerArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Thu, 20 Jan 2022 16:29:36 +0000 (17:29 +0100)
commit7e08486475d7a3f5e9e566e51fa3aad99289e213
tree9bde676ae4a17a2b7e1340ea8598647f134bac2d
parent7e035110784fba02ba81944e444be9a36932c6a3
cls/journal: skip disconnected clients when finding min_commit_position

When a new journal client is registered, all already registered
clients are checked, and a client with min position is selected
as a position for the new client. Thus we may expect that
starting from the registered position all journal entries will be
available (not trimmed) for the new client.

But when looking for a min commit position, the client_register
function did not take into account that a registered client might
be in disconnected state, and in that case the journal entries
might be trimmed for this client.

Fixes: https://tracker.ceph.com/issues/53888
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 078d72e5e6cfa41f809045ff03971ac8acf0d31e)
src/cls/journal/cls_journal.cc