At the moment, we are always running the PersistedLogLsnWatchdog independent of whether we are using the persisted or the archived lsn for log trimming. Since the PersistedLogLsnWatchdog always triggers a periodic flush, this adds unnecessary IO load to the system if we are using archived lsns for log trimming. Hence, we should only run the PersistedLogLsnWatchdog if no snapshot repository is configured and the number of worker nodes is 1 (similar to
|
if snapshots_repository_configured || cluster_state.nodes.len() > 1 { |
).
At the moment, we are always running the
PersistedLogLsnWatchdogindependent of whether we are using the persisted or the archived lsn for log trimming. Since thePersistedLogLsnWatchdogalways triggers a periodic flush, this adds unnecessary IO load to the system if we are using archived lsns for log trimming. Hence, we should only run thePersistedLogLsnWatchdogif no snapshot repository is configured and the number of worker nodes is 1 (similar torestate/crates/admin/src/cluster_controller/service/state.rs
Line 393 in 406bce5