Skip to content

Commit b3d6f39

Browse files
committed
reinit.sh with raftable
1 parent d76d609 commit b3d6f39

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

contrib/mmts/tests/reinit-mm.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@ pkill -9 postgres
55
pkill -9 arbiter
66

77
cd ~/code/postgres_cluster/contrib/mmts/
8-
make install
8+
make clean && make install
99
cd ~/code/postgres_cluster/contrib/raftable/
10-
make install
10+
make clean && make install
1111
cd ~/code/postgres_cluster/contrib/mmts/tests
1212

1313

1414
rm -fr node? *.log dtm
15-
mkdir dtm
1615
conn_str=""
1716
sep=""
1817
for ((i=1;i<=n_nodes;i++))
1918
do
20-
port=$((5431+i))
19+
port=$((5431 + i))
20+
raft_port=$((6665 + i))
2121
conn_str="$conn_str${sep}dbname=postgres host=localhost port=$port sslmode=disable"
22+
raft_conn_str="$raft_conn_str${sep}${i}:localhost:$raft_port"
2223
sep=","
2324
initdb node$i
2425
done
@@ -35,6 +36,9 @@ do
3536
sed "s/5432/$port/g" < postgresql.conf.mm > node$i/postgresql.conf
3637
echo "multimaster.conn_strings = '$conn_str'" >> node$i/postgresql.conf
3738
echo "multimaster.node_id = $i" >> node$i/postgresql.conf
39+
echo "raftable.id = $i" >> node$i/postgresql.conf
40+
echo "raftable.peers = '$raft_conn_str'" >> node$i/postgresql.conf
41+
3842
cp pg_hba.conf node$i
3943
pg_ctl -w -D node$i -l node$i.log start
4044
done

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy