Bug #53888
closedjournal: client_register does not check disconnected state when looking for min_commit_position
0%
Description
A new journal client is registered at min commit position, i.e. all already registered clients are checked and a client with min position is chosen, and its position is used for the new client. This way 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 does not take into account that a registered client may be in disconnected state, and in this case the journal entries may be trimmed for this client.
We should look for min commit position only emoung clients in "connected" state.
We did not observe this problem previously, because we had only one client (rbd-mirror) registered to follow master. Now, when we are trying to add multi-peer support and have several non-mastered clients the problem has been noticed.