Skip to content

Commit 545a044

Browse files
committed
merge
2 parents 90585ee + 2b86070 commit 545a044

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

contrib/mmts/tests2/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ if [ "$1" = 'postgres' ]; then
7373
max_replication_slots = 10
7474
max_wal_senders = 10
7575
shared_preload_libraries = 'raftable,multimaster'
76+
default_transaction_isolation = 'repeatable read'
7677
log_checkpoints = on
7778
log_autovacuum_min_duration = 0
7879

contrib/mmts/tests2/lib/event_history.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import time
23
import datetime
34
import uuid

contrib/raftable/raft/include/util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct timeval ms2tv(int ms);
4848

4949
#define shout(...) \
5050
do { \
51+
fprintf(stderr, "RAFT: "); \
5152
fprintf(stderr, __VA_ARGS__); \
5253
fflush(stderr); \
5354
} while (0)

contrib/raftable/raft/src/raft.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ void raft_tick(raft_t r, int msec) {
649649
if (r->timer < 0) {
650650
switch (r->role) {
651651
case FOLLOWER:
652-
debug(
652+
shout(
653653
"lost the leader,"
654654
" claiming leadership\n"
655655
);
@@ -659,7 +659,7 @@ void raft_tick(raft_t r, int msec) {
659659
raft_claim(r);
660660
break;
661661
case CANDIDATE:
662-
debug(
662+
shout(
663663
"the vote failed,"
664664
" claiming leadership\n"
665665
);
@@ -1055,6 +1055,7 @@ static void raft_handle_claim(raft_t r, raft_msg_claim_t *m) {
10551055
reply.granted = true;
10561056
}
10571057
finish:
1058+
shout("voting %s\n", reply.granted ? "yes" : "no");
10581059
raft_send(r, candidate, &reply, sizeof(reply));
10591060
}
10601061

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