Hi,
In LiteFS docs and examples it shows the following:
-
Checking if current node is primary is done by checking if
.primary
file exist on node and doing an IO command withcat /path/to/mnt/.primary
to get the primary host name.
Is there a way to avoid IO calls to check ifPrimary for each edit call?Although it is possible to get if node is primary on node start I imagine that when working with
dynamic lease (consul) it will change and I assume LiteFS have a listener on those changes.
So the above question is crucial. -
From what I understand, checking replication status is done by checking the position file in each node.
My question here is similar - If I want to monitor the status of DB edits and replication, how can I do it?
Can it be done without using IO (cat /path/to/mnt/db-pos
) with every collection we want to do to monitor this on the different nodes?
Thank you