Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions apps/weaviate/docker-compose-replication_single_voter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ services:
CLUSTER_HOSTNAME: 'node1'
CLUSTER_GOSSIP_BIND_PORT: '7100'
CLUSTER_DATA_BIND_PORT: '7101'
RAFT_JOIN: 'node1'
RAFT_JOIN: 'node1:8300'
RAFT_PORT: '8300'
RAFT_BOOTSTRAP_EXPECT: 1
PERSISTENCE_LSM_ACCESS_STRATEGY: '${PERSISTENCE_LSM_ACCESS_STRATEGY}'
DISABLE_TELEMETRY: 'true'
Expand Down Expand Up @@ -58,7 +59,8 @@ services:
CLUSTER_GOSSIP_BIND_PORT: '7102'
CLUSTER_DATA_BIND_PORT: '7103'
CLUSTER_JOIN: 'weaviate-node-1:7100'
RAFT_JOIN: 'node1'
RAFT_JOIN: 'node1:8300'
RAFT_PORT: '8300'
RAFT_BOOTSTRAP_EXPECT: 1
PERSISTENCE_LSM_ACCESS_STRATEGY: '${PERSISTENCE_LSM_ACCESS_STRATEGY}'
DISABLE_TELEMETRY: 'true'
Expand Down Expand Up @@ -90,7 +92,8 @@ services:
CLUSTER_GOSSIP_BIND_PORT: '7104'
CLUSTER_DATA_BIND_PORT: '7105'
CLUSTER_JOIN: 'weaviate-node-1:7100'
RAFT_JOIN: 'node1'
RAFT_JOIN: 'node1:8300'
RAFT_PORT: '8300'
RAFT_BOOTSTRAP_EXPECT: 1
PERSISTENCE_LSM_ACCESS_STRATEGY: '${PERSISTENCE_LSM_ACCESS_STRATEGY}'
DISABLE_TELEMETRY: 'true'
8 changes: 4 additions & 4 deletions replication_tunable_consistency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ echo "Done generating."
export COMPOSE="apps/weaviate/docker-compose-replication_single_voter.yml"

echo "Starting Weaviate..."
docker compose -f $COMPOSE up -d weaviate-node-1 weaviate-node-2 weaviate-node-3
docker compose -f $COMPOSE up -d --no-recreate weaviate-node-1 weaviate-node-2 weaviate-node-3
wait_weaviate 8080
wait_weaviate 8081
wait_weaviate 8082
Expand All @@ -51,7 +51,7 @@ fi

# Restart dead node, read objects with consistency level QUORUM
echo "Restart node 3"
docker compose -f $COMPOSE up -d weaviate-node-3
docker compose -f $COMPOSE up -d --no-recreate weaviate-node-3
wait_weaviate 8082
if docker run --network host -v "$PWD/workdir/:/workdir/data" --name cluster_one_node_down -t cluster_one_node_down; then
echo "All objects read with consistency level QUORUM after weaviate-node-3 restarted".
Expand All @@ -72,9 +72,9 @@ else
fi

# Restart dead nodes, read objects with consistency level ALL
docker compose -f $COMPOSE up -d weaviate-node-2
docker compose -f $COMPOSE up -d --no-recreate weaviate-node-2
wait_weaviate 8081
docker compose -f $COMPOSE up -d weaviate-node-3
docker compose -f $COMPOSE up -d --no-recreate weaviate-node-3
wait_weaviate 8082
if docker run --network host -v "$PWD/workdir/:/workdir/data" --name cluster_one_node_remaining -t cluster_one_node_remaining; then
echo "All objects read with consistency level ALL after weaviate-node-2 and weaviate-node-3 restarted".
Expand Down
Loading