In situations where the WAL lags behind but entries are still
committed the WAL will still write entries with indexes lower
than the last snapshot index for a given server. To avoid this
unnessary work we no check the ra_log_snapshot_state table for
each write and do not write them if they are lower than the
snapshot index. This allows the wal a better chance to catch
up on it's backlog.
Some changes needed to be made to the ra_log also to handle
this new behaviour.
In situations where the WAL lags behind but entries are still committed the WAL will still write entries with indexes lower than the last snapshot index for a given server. To avoid this unnessary work we no check the ra_log_snapshot_state table for each write and do not write them if they are lower than the snapshot index. This allows the wal a better chance to catch up on it's backlog.
Some changes needed to be made to the ra_log also to handle this new behaviour.