File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -974,7 +974,7 @@ MtmVotingCompleted(MtmTransState* ts)
974
974
return true;
975
975
} else if (MtmUseDtm ) {
976
976
ts -> votedMask = 0 ;
977
- SetPrepareTransactionState (ts -> gid , "precommitted" );
977
+ SetPrepareTransactionState (ts -> gid , MULTIMASTER_PRECOMMITTED );
978
978
//MtmSend2PCMessage(ts, MSG_PRECOMMIT);
979
979
return false;
980
980
} else {
@@ -1130,7 +1130,7 @@ MtmCommitPreparedTransaction(MtmCurrentTrans* x)
1130
1130
ts -> votedMask = 0 ;
1131
1131
ts -> procno = MyProc -> pgprocno ;
1132
1132
MTM_TXTRACE (ts , "Coordinator sends MSG_PRECOMMIT" );
1133
- SetPrepareTransactionState (ts -> gid , "precommitted" );
1133
+ SetPrepareTransactionState (ts -> gid , MULTIMASTER_PRECOMMITTED );
1134
1134
//MtmSend2PCMessage(ts, MSG_PRECOMMIT);
1135
1135
1136
1136
Mtm2PCVoting (x , ts );
@@ -1372,7 +1372,7 @@ static void MtmLoadPreparedTransactions(void)
1372
1372
Mtm -> nActiveTransactions += 1 ;
1373
1373
ts -> isEnqueued = false;
1374
1374
ts -> isActive = true;
1375
- ts -> status = strcmp (pxacts [i ].state_3pc , "precommitted" ) == 0 ? TRANSACTION_STATUS_UNKNOWN : TRANSACTION_STATUS_IN_PROGRESS ;
1375
+ ts -> status = strcmp (pxacts [i ].state_3pc , MULTIMASTER_PRECOMMITTED ) == 0 ? TRANSACTION_STATUS_UNKNOWN : TRANSACTION_STATUS_IN_PROGRESS ;
1376
1376
ts -> isLocal = true;
1377
1377
ts -> isPrepared = false;
1378
1378
ts -> isPinned = false;
Original file line number Diff line number Diff line change 10
10
#include "commands/vacuum.h"
11
11
#include "libpq-fe.h"
12
12
13
+ #ifndef DEBUG_LEVEL
13
14
#define DEBUG_LEVEL 0
14
- #define MTM_TRACE 1
15
+ #endif
16
+
17
+ #ifndef MTM_TRACE
18
+ #define MTM_TRACE 0
19
+ #endif
15
20
16
21
#if DEBUG_LEVEL == 0
17
22
#define MTM_LOG1 (fmt , ...) elog(LOG, fmt, ## __VA_ARGS__)
35
40
#define MTM_LOG4 (fmt , ...) fprintf(stderr, fmt "\n", ## __VA_ARGS__)
36
41
#endif
37
42
38
- #ifndef MTM_TRACE
43
+ #if MTM_TRACE
39
44
#define MTM_TXTRACE (tx , event )
40
45
#else
41
46
#define MTM_TXTRACE (tx , event ) \
58
63
#define MULTIMASTER_LOCK_BUF_INIT_SIZE 4096
59
64
#define MULTIMASTER_BROADCAST_SERVICE "mtm_broadcast"
60
65
#define MULTIMASTER_ADMIN "mtm_admin"
66
+ #define MULTIMASTER_PRECOMMITTED "precommitted"
61
67
62
68
#define MULTIMASTER_DEFAULT_ARBITER_PORT 5433
63
69
You can’t perform that action at this time.
0 commit comments