fix: use .primary file for primary detection in LiteFS 0.5
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 50s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 50s
This commit is contained in:
@@ -47,7 +47,9 @@ echo "Starting Consul registration loop..."
|
||||
LAST_STATE="unknown"
|
||||
|
||||
while true; do
|
||||
if /usr/local/bin/litefs is-primary; then
|
||||
# In LiteFS 0.5, .primary file exists ONLY on replicas.
|
||||
# We check /data/.primary because /data is our mount point.
|
||||
if [ ! -f /data/.primary ]; then
|
||||
CURRENT_STATE="primary"
|
||||
else
|
||||
CURRENT_STATE="replica"
|
||||
|
||||
Reference in New Issue
Block a user