File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -975,7 +975,7 @@ MtmVotingCompleted(MtmTransState* ts)
975
975
return true;
976
976
} else if (MtmUseDtm ) {
977
977
ts -> votedMask = 0 ;
978
- SetPrepareTransactionState (ts -> gid , "precommitted" );
978
+ SetPrepareTransactionState (ts -> gid , MULTIMASTER_PRECOMMITTED );
979
979
//MtmSend2PCMessage(ts, MSG_PRECOMMIT);
980
980
return false;
981
981
} else {
@@ -1131,7 +1131,7 @@ MtmCommitPreparedTransaction(MtmCurrentTrans* x)
1131
1131
ts -> votedMask = 0 ;
1132
1132
ts -> procno = MyProc -> pgprocno ;
1133
1133
MTM_TXTRACE (ts , "Coordinator sends MSG_PRECOMMIT" );
1134
- SetPrepareTransactionState (ts -> gid , "precommitted" );
1134
+ SetPrepareTransactionState (ts -> gid , MULTIMASTER_PRECOMMITTED );
1135
1135
//MtmSend2PCMessage(ts, MSG_PRECOMMIT);
1136
1136
1137
1137
Mtm2PCVoting (x , ts );
@@ -1374,7 +1374,7 @@ static void MtmLoadPreparedTransactions(void)
1374
1374
Mtm -> nActiveTransactions += 1 ;
1375
1375
ts -> isEnqueued = false;
1376
1376
ts -> isActive = true;
1377
- ts -> status = strcmp (pxacts [i ].state_3pc , "precommitted" ) == 0 ? TRANSACTION_STATUS_UNKNOWN : TRANSACTION_STATUS_IN_PROGRESS ;
1377
+ ts -> status = strcmp (pxacts [i ].state_3pc , MULTIMASTER_PRECOMMITTED ) == 0 ? TRANSACTION_STATUS_UNKNOWN : TRANSACTION_STATUS_IN_PROGRESS ;
1378
1378
ts -> isLocal = true;
1379
1379
ts -> isPrepared = false;
1380
1380
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