qubic/core

Reduce risk of topology problems due to auto-save

Closed this issue · 0 comments

Introduce random tick offset (phase) and enforce auto-save period when switching modes to reduce risk of multiple nodes running auto-save in parallel

Before, switching from MAIN to AUX often has led to instant auto-save, potentially causing problems if modes of mulitple nodes are switched simultaneously.
Further, with default setting of TICK_STORAGE_AUTOSAVE_TICK_PERIOD, auto-save also happened simultaneously.

Close connections before saving to disk, ideally causing other nodes to reconnect to nodes not doing auto-save