tursodatabase / tursodatabase/libsql

Namespaces not available in replica

Open
#1,804 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

Hey folks,

I have a docker-compose setup as follows:

services:
  db:
    image: ghcr.io/tursodatabase/libsql-server:e853d54
    volumes:
      - db_data:/var/lib/sqld
    ports:
      - 8080:8080
      - 8082:8082
    environment:
      - SQLD_NODE=primary
      - SQLD_HTTP_LISTEN_ADDR=0.0.0.0:8080
      - SQLD_GRPC_LISTEN_ADDR=0.0.0.0:5001
      - RUST_LOG=debug
    command: [ 'sqld', '--db-path', '/var/lib/sqld/primary.sqld', '--admin-listen-addr', '0.0.0.0:8082', '--enable-namespaces' ]
  replica:
    image: ghcr.io/tursodatabase/libsql-server:e853d54
    volumes:
      - db_replica:/var/lib/sqld
    depends_on:
      - db
    ports:
      - '8081:8080'
    environment:
      - SQLD_NODE=replica
      - SQLD_PRIMARY_URL=http://db:5001
      - RUST_LOG=debug
volumes:
  db_data:
  db_replica:

Without namespaces, this setup works fine and everything is replicated to the replica instance. But as soon as I enable namespaces and create a new namespace via the Admin API, it's not available in the replica and only in the primary.

Is there something I'm missing in my compose file?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided docker-compose configuration, enabling namespaces on the primary and creating one through the Admin API. Compare namespace availability on the primary and replica; done means a namespace created on the primary is also available on the replica.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.