Skip to content
Snippets Groups Projects
Commit da85fd2a authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

recovery: do not stall replication on unfinished xlog

recover_remaining_wals() doesn't proceed to the next xlog until the
current one is finalized (EOF marker is written). As a result, if an
xlog wasn't finalized for some reason (IO error occurred or tarantool
was killed in cold blood with SIGKILL), replication will stall on the
unfinished xlog forever.

To preclude that, let's differentiate WAL write and rotation in WAL
watcher and force recover_remaining_wals() rescan the WAL directory on
any WAL rotation so that it will continue to the next WAL even if the
current one wasn't properly finalized. In case of hot standby, we can't
reliably detect WAL rotation (e.g. on Mac OS inotify may not work) so
also rescan the WAL directory every wal_dir_rescan_delay seconds.

Closes #2294
parent b51b7a0f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment