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

replica: advance gc state only when xlog is closed

Advancing replica->gc on every status update is inefficient as gc can
only be invoked when we move to the next xlog file. Currently, it's
acceptable, because status is only updated once per second, but there's
no guarantee that it won't be updated say every millisecond in future,
in which case advancing replica->gc on every status update may become
too costly.

So introduce a trigger invoked every time an xlog is closed by
recover_remaining_wals() and use it in relay to send a special gc
message.
parent f986bc96
No related branches found
No related tags found
No related merge requests found
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