Skip to content

Commit

Permalink
database: Report when resync'd
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Jun 14, 2024
1 parent d9ee9cb commit 109072f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions database.pike
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ constant tables = ([
"user_login_sightings": ({
"twitchid bigint not null",
"login text not null",
"bot text not null",
"sighted timestamp with time zone not null default now()",
" primary key (twitchid, login)",
}),
Expand Down Expand Up @@ -739,6 +740,10 @@ __async__ void replication_watchdog() {
}
if (live[0]->confirmed_flush_lsn == repl[0]->received_lsn &&
repl[0]->received_lsn == repl[0]->latest_end_lsn) {
if (repl_failures) werror("REPL WDOG: Back in sync %O %O %O %O\n",
live[0]->restart_lsn, live[0]->confirmed_flush_lsn,
repl[0]->received_lsn, repl[0]->latest_end_lsn,
);
repl_failures = 0;
return; //All good, in sync.
}
Expand Down

0 comments on commit 109072f

Please sign in to comment.