Skip to content

Commit 7ca0008

Browse files
author
Mikhail Rutman
committed
fix transaction parsing
In the commit 04e72dd the code for reading sender_node_id and action type was removed. This commit fixes this issue.
1 parent a5dc433 commit 7ca0008

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/pglogical_apply.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,10 @@ static void
194194
process_remote_begin(StringInfo s, MtmReceiverWorkerContext *rwctx)
195195
{
196196
/* there is no need to send this, but since we do, check its sanity */
197-
#ifdef USE_ASSERT_CHECKING
198197
int sender_node_id = pq_getmsgint(s, 4);
199-
#endif
198+
199+
(void) sender_node_id; /* keep the compiler quiet when asserts are disabled*/
200+
200201
Assert(rwctx->sender_node_id == sender_node_id);
201202
rwctx->origin_xid = pq_getmsgint64(s);
202203
mtm_log(MtmApplyTrace, "processing begin of xid " XID_FMT, rwctx->origin_xid);

src/pglogical_receiver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,12 @@ MtmFilterTransaction(char *record, int size, Syncpoint *spvector,
318318
}
319319
else if (msgtype == 'M')
320320
{
321-
#ifdef USE_ASSERT_CHECKING
322321
char action = pq_getmsgbyte(&s);
323-
#endif
324322
int messageSize;
325323
char const *messageBody;
326324

325+
(void) action; /* keep the compiler quiet when asserts are disabled*/
326+
327327
end_lsn = pq_getmsgint64(&s);
328328
messageSize = pq_getmsgint(&s, 4);
329329
messageBody = pq_getmsgbytes(&s, messageSize);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy