Skip to content

Commit a422a23

Browse files
committed
fix integer overflow in slot lag calculation =(
1 parent 03737b4 commit a422a23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

multimaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ MtmCheckSlots()
20362036
if (slot->in_use
20372037
&& sscanf(slot->data.name.data, MULTIMASTER_SLOT_PATTERN, &nodeId) == 1
20382038
&& BIT_CHECK(Mtm->disabledNodeMask, nodeId-1)
2039-
&& slot->data.confirmed_flush + MtmMaxRecoveryLag * 1024 < GetXLogInsertRecPtr()
2039+
&& slot->data.confirmed_flush + (long64) MtmMaxRecoveryLag * 1024 < GetXLogInsertRecPtr()
20402040
&& slot->data.confirmed_flush != 0)
20412041
{
20422042
MTM_ELOG(WARNING, "Drop slot for node %d which lag %lld B is larger than threshold %d kB",

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