Yoni Augarten
02/06/2023, 3:55 AMreplicas: 3
to scale up - and on the first run I'm getting the following error on one of the lakeFS containers, and it fails to start:
setup failed: ERROR: relation \"kv_49\" already exists (SQLSTATE 42P07)
Seems like a race condition. Any recommendations on how to deal with it?Barak Amar
Yoni Augarten
02/06/2023, 7:49 AMversion: "3.9"
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: lakefs
POSTGRES_PASSWORD: lakefs
POSTGRES_DB: lakefs
volumes:
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "lakefs"]
interval: 5s
retries: 5
restart: always
lakefs:
image: treeverse/lakefs:0.92.0
deploy:
replicas: 3
ports:
- "8001"
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- LAKEFS_BLOCKSTORE_TYPE=s3
- LAKEFS_DATABASE_TYPE=postgres
- LAKEFS_DATABASE_POSTGRES_CONNECTION_STRING=<postgresql://lakefs:lakefs@postgres:5432/lakefs?sslmode=disable>
- LAKEFS_AUTH_ENCRYPT_SECRET_KEY=a123456
- LAKEFS_LOGGING_LEVEL=INFO
- LAKEFS_LOGGING_AUDIT_LOG_LEVEL=INFO
- LAKEFS_LISTEN_ADDRESS=0.0.0.0:8001
depends_on:
postgres:
condition: service_healthy
volumes:
- ~/.aws:/home/lakefs/.aws:ro
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- lakefs
ports:
- "8000:8000"
volumes:
postgres-db-volume:
Barak Amar
Yoni Augarten
02/06/2023, 8:43 AMBarak Amar
lfs-postgres-1 | 2023-02-06 07:51:49.353 UTC [124] ERROR: relation "kv_91" already exists
lfs-postgres-1 | 2023-02-06 07:51:49.353 UTC [124] STATEMENT: CREATE TABLE IF NOT EXISTS"kv_91" PARTITION OF "kv" FOR VALUES WITH (MODULUS 100,REMAINDER 91);
cdff8ade65ba postgres:13 "docker-entrypoint.s…" 2 hours ago Up 2 hours (healthy) 5432/tcp lfs-postgres-1
Yoni Augarten
02/06/2023, 11:52 AM