@@ -360,7 +360,7 @@ static void MtmSendHeartbeat()
360
360
msg .node = MtmNodeId ;
361
361
msg .csn = now ;
362
362
if (last_sent_heartbeat != 0 && last_sent_heartbeat + MSEC_TO_USEC (MtmHeartbeatSendTimeout )* 2 < now ) {
363
- MTM_LOG1 ("More than %ld microseconds since last heartbeat" , now - last_sent_heartbeat );
363
+ MTM_LOG1 ("More than %lld microseconds since last heartbeat" , now - last_sent_heartbeat );
364
364
}
365
365
last_sent_heartbeat = now ;
366
366
@@ -377,7 +377,7 @@ static void MtmSendHeartbeat()
377
377
elog (LOG , "Arbiter failed to send heartbeat to node %d" , i + 1 );
378
378
} else {
379
379
if (last_heartbeat_to_node [i ] + MSEC_TO_USEC (MtmHeartbeatSendTimeout )* 2 < now ) {
380
- MTM_LOG1 ("Last heartbeat to node %d was sent %ld microseconds ago" , i + 1 , now - last_heartbeat_to_node [i ]);
380
+ MTM_LOG1 ("Last heartbeat to node %d was sent %lld microseconds ago" , i + 1 , now - last_heartbeat_to_node [i ]);
381
381
}
382
382
last_heartbeat_to_node [i ] = now ;
383
383
/* Connectivity mask can be cleared by MtmWatchdog: in this case sockets[i] >= 0 */
@@ -388,7 +388,7 @@ static void MtmSendHeartbeat()
388
388
MtmReconnectNode (i + 1 ); /* set reconnect mask to force node reconnent */
389
389
//MtmOnNodeConnect(i+1);
390
390
}
391
- MTM_LOG4 ("Send heartbeat to node %d with timestamp %ld " , i + 1 , now );
391
+ MTM_LOG4 ("Send heartbeat to node %d with timestamp %lld " , i + 1 , now );
392
392
}
393
393
} else {
394
394
MTM_LOG2 ("Do not send heartbeat to node %d, busy mask %lld, status %s" , i + 1 , (long long ) busy_mask , MtmNodeStatusMnem [Mtm -> status ]);
@@ -940,7 +940,7 @@ static void MtmReceiver(Datum arg)
940
940
941
941
switch (msg -> code ) {
942
942
case MSG_HEARTBEAT :
943
- MTM_LOG4 ("Receive HEARTBEAT from node %d with timestamp %ld delay %ld " ,
943
+ MTM_LOG4 ("Receive HEARTBEAT from node %d with timestamp %lld delay %lld " ,
944
944
node , msg -> csn , USEC_TO_MSEC (MtmGetSystemTime () - msg -> csn ));
945
945
continue ;
946
946
case MSG_POLL_REQUEST :
@@ -1017,13 +1017,13 @@ static void MtmReceiver(Datum arg)
1017
1017
}
1018
1018
ts = (MtmTransState * )hash_search (MtmXid2State , & msg -> dxid , HASH_FIND , NULL );
1019
1019
if (ts == NULL ) {
1020
- elog (WARNING , "Ignore response for unexisted transaction %lu from node %d" , (long )msg -> dxid , node );
1020
+ elog (WARNING , "Ignore response for unexisted transaction %llu from node %d" , (long64 )msg -> dxid , node );
1021
1021
continue ;
1022
1022
}
1023
1023
Assert (msg -> code == MSG_ABORTED || strcmp (msg -> gid , ts -> gid ) == 0 );
1024
1024
if (BIT_CHECK (ts -> votedMask , node - 1 )) {
1025
- elog (WARNING , "Receive deteriorated %s response for transaction %s (%lu ) from node %d" ,
1026
- MtmMessageKindMnem [msg -> code ], ts -> gid , (long )ts -> xid , node );
1025
+ elog (WARNING , "Receive deteriorated %s response for transaction %s (%llu ) from node %d" ,
1026
+ MtmMessageKindMnem [msg -> code ], ts -> gid , (long64 )ts -> xid , node );
1027
1027
continue ;
1028
1028
}
1029
1029
BIT_SET (ts -> votedMask , node - 1 );
@@ -1033,8 +1033,8 @@ static void MtmReceiver(Datum arg)
1033
1033
case MSG_PREPARED :
1034
1034
MTM_TXTRACE (ts , "MtmTransReceiver got MSG_PREPARED" );
1035
1035
if (ts -> status == TRANSACTION_STATUS_COMMITTED ) {
1036
- elog (WARNING , "Receive PREPARED response for already committed transaction %lu from node %d" ,
1037
- (long )ts -> xid , node );
1036
+ elog (WARNING , "Receive PREPARED response for already committed transaction %llu from node %d" ,
1037
+ (long64 )ts -> xid , node );
1038
1038
continue ;
1039
1039
}
1040
1040
Mtm -> nodes [node - 1 ].transDelay += MtmGetCurrentTime () - ts -> csn ;
@@ -1043,8 +1043,8 @@ static void MtmReceiver(Datum arg)
1043
1043
if ((~msg -> disabledNodeMask & Mtm -> disabledNodeMask ) != 0 ) {
1044
1044
/* Coordinator's disabled mask is wider than of this node: so reject such transaction to avoid
1045
1045
commit on smaller subset of nodes */
1046
- elog (WARNING , "Coordinator of distributed transaction %s (%lu ) see less nodes than node %d: %llx instead of %llx" ,
1047
- ts -> gid , (long )ts -> xid , node , ( long long ) Mtm -> disabledNodeMask , ( long long ) msg -> disabledNodeMask );
1046
+ elog (WARNING , "Coordinator of distributed transaction %s (%llu ) see less nodes than node %d: %llx instead of %llx" ,
1047
+ ts -> gid , (long64 )ts -> xid , node , Mtm -> disabledNodeMask , msg -> disabledNodeMask );
1048
1048
MtmAbortTransaction (ts );
1049
1049
}
1050
1050
if ((ts -> participantsMask & ~Mtm -> disabledNodeMask & ~ts -> votedMask ) == 0 ) {
@@ -1053,7 +1053,7 @@ static void MtmReceiver(Datum arg)
1053
1053
MtmWakeUpBackend (ts );
1054
1054
} else {
1055
1055
Assert (ts -> status == TRANSACTION_STATUS_IN_PROGRESS );
1056
- MTM_LOG2 ("Transaction %s is prepared (status=%s participants=%lx disabled=%lx , voted=%lx )" ,
1056
+ MTM_LOG2 ("Transaction %s is prepared (status=%s participants=%llx disabled=%llx , voted=%llx )" ,
1057
1057
ts -> gid , MtmTxnStatusMnem [ts -> status ], ts -> participantsMask , Mtm -> disabledNodeMask , ts -> votedMask );
1058
1058
ts -> isPrepared = true;
1059
1059
if (ts -> isTwoPhase ) {
@@ -1079,12 +1079,12 @@ static void MtmReceiver(Datum arg)
1079
1079
break ;
1080
1080
case MSG_ABORTED :
1081
1081
if (ts -> status == TRANSACTION_STATUS_COMMITTED ) {
1082
- elog (WARNING , "Receive ABORTED response for already committed transaction %s (%lu ) from node %d" ,
1083
- ts -> gid , (long )ts -> xid , node );
1082
+ elog (WARNING , "Receive ABORTED response for already committed transaction %s (%llu ) from node %d" ,
1083
+ ts -> gid , (long64 )ts -> xid , node );
1084
1084
continue ;
1085
1085
}
1086
1086
if (ts -> status != TRANSACTION_STATUS_ABORTED ) {
1087
- MTM_LOG1 ("Arbiter receive abort message for transaction %s (%lu )" , ts -> gid , (long )ts -> xid );
1087
+ MTM_LOG1 ("Arbiter receive abort message for transaction %s (%llu )" , ts -> gid , (long64 )ts -> xid );
1088
1088
Assert (ts -> status == TRANSACTION_STATUS_IN_PROGRESS );
1089
1089
MtmAbortTransaction (ts );
1090
1090
}
@@ -1095,8 +1095,8 @@ static void MtmReceiver(Datum arg)
1095
1095
case MSG_PRECOMMITTED :
1096
1096
MTM_TXTRACE (ts , "MtmTransReceiver got MSG_PRECOMMITTED" );
1097
1097
if (ts -> status == TRANSACTION_STATUS_COMMITTED ) {
1098
- elog (WARNING , "Receive PRECOMMITTED response for already committed transaction %s (%lu ) from node %d" ,
1099
- ts -> gid , (long )ts -> xid , node );
1098
+ elog (WARNING , "Receive PRECOMMITTED response for already committed transaction %s (%llu ) from node %d" ,
1099
+ ts -> gid , (long64 )ts -> xid , node );
1100
1100
continue ;
1101
1101
}
1102
1102
if (ts -> status == TRANSACTION_STATUS_IN_PROGRESS ) {
@@ -1111,8 +1111,8 @@ static void MtmReceiver(Datum arg)
1111
1111
}
1112
1112
} else {
1113
1113
Assert (ts -> status == TRANSACTION_STATUS_ABORTED );
1114
- elog (WARNING , "Receive PRECOMMITTED response for aborted transaction %s (%lu ) from node %d" ,
1115
- ts -> gid , (long )ts -> xid , node ); // How it can happen? SHould we use assert here?
1114
+ elog (WARNING , "Receive PRECOMMITTED response for aborted transaction %s (%llu ) from node %d" ,
1115
+ ts -> gid , (long64 )ts -> xid , node ); // How it can happen? SHould we use assert here?
1116
1116
if ((ts -> participantsMask & ~Mtm -> disabledNodeMask & ~ts -> votedMask ) == 0 ) {
1117
1117
MtmWakeUpBackend (ts );
1118
1118
}
@@ -1160,7 +1160,7 @@ static void MtmReceiver(Datum arg)
1160
1160
if (!MtmWatchdog (now )) {
1161
1161
for (i = 0 ; i < nNodes ; i ++ ) {
1162
1162
if (Mtm -> nodes [i ].lastHeartbeat != 0 && sockets [i ] >= 0 ) {
1163
- MTM_LOG1 ("Last heartbeat from node %d received %ld microseconds ago" , i + 1 , now - Mtm -> nodes [i ].lastHeartbeat );
1163
+ MTM_LOG1 ("Last heartbeat from node %d received %lld microseconds ago" , i + 1 , now - Mtm -> nodes [i ].lastHeartbeat );
1164
1164
}
1165
1165
}
1166
1166
}
0 commit comments