Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 120e4ab

Browse files
committed
doc updates
1 parent 4522752 commit 120e4ab

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

src/commit.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,18 @@ MtmBeginTransaction()
146146
/* Reject all user's transactions at offline cluster.
147147
* Allow execution of transaction by bg-workers to makeit possible to perform recovery.
148148
*/
149-
mtm_log(ERROR,
150-
"Multimaster node is not online: current status %s",
151-
MtmNodeStatusMnem[Mtm->status]);
149+
if (!MtmBreakConnection)
150+
{
151+
mtm_log(ERROR,
152+
"Multimaster node is not online: current status %s",
153+
MtmNodeStatusMnem[Mtm->status]);
154+
}
155+
else
156+
{
157+
mtm_log(FATAL,
158+
"Multimaster node is not online: current status %s",
159+
MtmNodeStatusMnem[Mtm->status]);
160+
}
152161
}
153162
}
154163

src/include/multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ extern int MtmHeartbeatRecvTimeout;
250250
extern char *MtmRefereeConnStr;
251251
extern int MtmMaxWorkers;
252252
extern int MtmMaxNodes;
253+
extern bool MtmBreakConnection;
253254

254255
/* XXX! need rename: that's actually a disconnectivity mask */
255256
#define SELF_CONNECTIVITY_MASK (Mtm->selfConnectivityMask)

src/multimaster.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ int MtmTransSpillThreshold; // XXX: align with receiver buffer size
135135
int MtmHeartbeatSendTimeout;
136136
int MtmHeartbeatRecvTimeout;
137137
char* MtmRefereeConnStr;
138+
bool MtmBreakConnection;
138139

139140
static int MtmQueueSize;
140141

@@ -551,6 +552,19 @@ _PG_init(void)
551552
NULL /* GucShowHook show_hook */
552553
);
553554

555+
DefineCustomBoolVariable(
556+
"multimaster.break_connection",
557+
"Break connection with client when node is no online",
558+
NULL,
559+
&MtmBreakConnection,
560+
false,
561+
PGC_BACKEND,
562+
0,
563+
NULL,
564+
NULL,
565+
NULL
566+
);
567+
554568
MtmDeadlockDetectorInit(MtmMaxNodes);
555569

556570
/*

0 commit comments

Comments
 (0)