Skip to content
Snippets Groups Projects
Commit c80b1215 authored by Alexander Turenko's avatar Alexander Turenko Committed by Alexander Turenko
Browse files

config: add safe startup mode

If the startup may take a long time (reads of an existing snapshot or
fetches it from a remote master), then

* If there are other instances in the replicaset, force the read-only
  mode on the database startup[^1].
* After the database startup, re-read the configuration and apply the
  fresh one (now without any RO/RW mangling).

If the startup shouldn't take a long time[^2], the configuration is
read and applied once.

[^1]: The read-only mode is not forced if there is no existing snapshot.
      It may lead to missing bootstrap leader in the replicaset. See
      details in the comment in the box_cfg applier code.
[^2]: There is the only case that we consider as such: startup of an
      instance without an existing snapshot without other instances in
      the same replicaset.

Part of #8810

NO_DOC=the old behavior was not released, the documentation request will
       be registered manually
NO_CHANGELOG=see NO_DOC
NO_TEST=it is not trivial to verify automatically
parent 8ee2b0d8
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