docs: SQL writes through raft (C3b) done
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
Mark the C3b design done; document leader-only DML, env vars, and default-DB apply limits in en/bg distributed docs; refresh the README raft status line.
This commit is contained in:
+11
-1
@@ -7,7 +7,17 @@ BaraDB supports distributed deployment with Raft consensus, sharding, and replic
|
||||
|
||||
## Raft Consensus
|
||||
|
||||
Leader election and log replication:
|
||||
Leader election and log replication over TCP. Enable with:
|
||||
|
||||
| Env | Meaning |
|
||||
|-----|---------|
|
||||
| `BARADB_RAFT_ENABLED=true` | Turn on Raft |
|
||||
| `BARADB_RAFT_NODE_ID` | This node's id |
|
||||
| `BARADB_RAFT_PORT` | Raft TCP port |
|
||||
| `BARADB_RAFT_PEERS` | Comma-separated `id@host:port` (include self) |
|
||||
| `BARADB_RAFT_WRITE_TIMEOUT_MS` | Max wait for majority commit on SQL writes (default 5000) |
|
||||
|
||||
When Raft is enabled, SQL DML (`INSERT`/`UPDATE`/`DELETE`/`MERGE` and transactional `COMMIT`) is accepted only on the leader: each write's KV pairs are appended to the Raft log and the client waits until the entry is majority-committed. Followers reject writes with `not leader; leader is '…'`. Followers apply committed entries via `applyCommand` into the **default** database. DDL (e.g. `CREATE TABLE`) is not replicated yet — apply schema on every node.
|
||||
|
||||
```nim
|
||||
import barabadb/core/raft
|
||||
|
||||
Reference in New Issue
Block a user