@@ -360,7 +360,7 @@ static void MtmSendHeartbeat()
360360 msg .node = MtmNodeId ;
361361 msg .csn = now ;
362362 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 );
364364 }
365365 last_sent_heartbeat = now ;
366366
@@ -377,7 +377,7 @@ static void MtmSendHeartbeat()
377377 elog (LOG , "Arbiter failed to send heartbeat to node %d" , i + 1 );
378378 } else {
379379 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 ]);
381381 }
382382 last_heartbeat_to_node [i ] = now ;
383383 /* Connectivity mask can be cleared by MtmWatchdog: in this case sockets[i] >= 0 */
@@ -388,7 +388,7 @@ static void MtmSendHeartbeat()
388388 MtmReconnectNode (i + 1 ); /* set reconnect mask to force node reconnent */
389389 //MtmOnNodeConnect(i+1);
390390 }
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 );
392392 }
393393 } else {
394394 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)
940940
941941 switch (msg -> code ) {
942942 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 " ,
944944 node , msg -> csn , USEC_TO_MSEC (MtmGetSystemTime () - msg -> csn ));
945945 continue ;
946946 case MSG_POLL_REQUEST :
@@ -1017,13 +1017,13 @@ static void MtmReceiver(Datum arg)
10171017 }
10181018 ts = (MtmTransState * )hash_search (MtmXid2State , & msg -> dxid , HASH_FIND , NULL );
10191019 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 );
10211021 continue ;
10221022 }
10231023 Assert (msg -> code == MSG_ABORTED || strcmp (msg -> gid , ts -> gid ) == 0 );
10241024 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 );
10271027 continue ;
10281028 }
10291029 BIT_SET (ts -> votedMask , node - 1 );
@@ -1033,8 +1033,8 @@ static void MtmReceiver(Datum arg)
10331033 case MSG_PREPARED :
10341034 MTM_TXTRACE (ts , "MtmTransReceiver got MSG_PREPARED" );
10351035 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 );
10381038 continue ;
10391039 }
10401040 Mtm -> nodes [node - 1 ].transDelay += MtmGetCurrentTime () - ts -> csn ;
@@ -1043,8 +1043,8 @@ static void MtmReceiver(Datum arg)
10431043 if ((~msg -> disabledNodeMask & Mtm -> disabledNodeMask ) != 0 ) {
10441044 /* Coordinator's disabled mask is wider than of this node: so reject such transaction to avoid
10451045 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 );
10481048 MtmAbortTransaction (ts );
10491049 }
10501050 if ((ts -> participantsMask & ~Mtm -> disabledNodeMask & ~ts -> votedMask ) == 0 ) {
@@ -1053,7 +1053,7 @@ static void MtmReceiver(Datum arg)
10531053 MtmWakeUpBackend (ts );
10541054 } else {
10551055 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 )" ,
10571057 ts -> gid , MtmTxnStatusMnem [ts -> status ], ts -> participantsMask , Mtm -> disabledNodeMask , ts -> votedMask );
10581058 ts -> isPrepared = true;
10591059 if (ts -> isTwoPhase ) {
@@ -1079,12 +1079,12 @@ static void MtmReceiver(Datum arg)
10791079 break ;
10801080 case MSG_ABORTED :
10811081 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 );
10841084 continue ;
10851085 }
10861086 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 );
10881088 Assert (ts -> status == TRANSACTION_STATUS_IN_PROGRESS );
10891089 MtmAbortTransaction (ts );
10901090 }
@@ -1095,8 +1095,8 @@ static void MtmReceiver(Datum arg)
10951095 case MSG_PRECOMMITTED :
10961096 MTM_TXTRACE (ts , "MtmTransReceiver got MSG_PRECOMMITTED" );
10971097 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 );
11001100 continue ;
11011101 }
11021102 if (ts -> status == TRANSACTION_STATUS_IN_PROGRESS ) {
@@ -1111,8 +1111,8 @@ static void MtmReceiver(Datum arg)
11111111 }
11121112 } else {
11131113 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?
11161116 if ((ts -> participantsMask & ~Mtm -> disabledNodeMask & ~ts -> votedMask ) == 0 ) {
11171117 MtmWakeUpBackend (ts );
11181118 }
@@ -1160,7 +1160,7 @@ static void MtmReceiver(Datum arg)
11601160 if (!MtmWatchdog (now )) {
11611161 for (i = 0 ; i < nNodes ; i ++ ) {
11621162 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 );
11641164 }
11651165 }
11661166 }
0 commit comments