This is an automated email from the ASF dual-hosted git repository.
tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new 81feec76f0d Fix putIntoUnackQueueRing function logic for Intercontect
interfaces:loss advance method
81feec76f0d is described below
commit 81feec76f0df9d2fb837f6130d77f62a7c9592e3
Author: ZTE-EBASE <[email protected]>
AuthorDate: Mon Sep 28 14:04:23 2026 +0800
Fix putIntoUnackQueueRing function logic for Intercontect interfaces:loss
advance method
Co-authored-by: 王平10304955 <[email protected]>
---
contrib/interconnect/udp/ic_udpifc.c | 14 +++++++-------
contrib/udp2/ic_common/udp2/ic_udp2.cpp | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/contrib/interconnect/udp/ic_udpifc.c
b/contrib/interconnect/udp/ic_udpifc.c
index d00c4f7727b..2ac3ea1cadc 100644
--- a/contrib/interconnect/udp/ic_udpifc.c
+++ b/contrib/interconnect/udp/ic_udpifc.c
@@ -7025,8 +7025,14 @@ putIntoUnackQueueRing(UnackQueueRing *uqr, ICBuffer
*buf, uint64 expTime, uint64
}
else if (diff < TIMER_SPAN_LOSS)
{
- diff = diff < TIMER_SPAN_LOSS ? TIMER_SPAN_LOSS : diff;
+ diff = TIMER_SPAN_LOSS;
}
+
+ idx = (uqr->idx + diff / TIMER_SPAN_LOSS) %
UNACK_QUEUE_RING_SLOTS_NUM;
+
+#ifdef AMS_VERBOSE_LOGGING
+ write_log("PUTTW: curtime " UINT64_FORMAT " now " UINT64_FORMAT
" (diff " UINT64_FORMAT ") expTime " UINT64_FORMAT " previdx %d, nowidx %d,
nextidx %d", uqr->currentTime, now, diff, expTime, buf->unackQueueRingSlot,
uqr->idx, idx);
+#endif
}
else
{
@@ -7053,12 +7059,6 @@ putIntoUnackQueueRing(UnackQueueRing *uqr, ICBuffer
*buf, uint64 expTime, uint64
#endif
}
- idx = (uqr->idx + diff / TIMER_SPAN) % UNACK_QUEUE_RING_SLOTS_NUM;
-
-#ifdef AMS_VERBOSE_LOGGING
- write_log("PUTTW: curtime " UINT64_FORMAT " now " UINT64_FORMAT " (diff
" UINT64_FORMAT ") expTime " UINT64_FORMAT " previdx %d, nowidx %d, nextidx
%d", uqr->currentTime, now, diff, expTime, buf->unackQueueRingSlot, uqr->idx,
idx);
-#endif
-
buf->unackQueueRingSlot = idx;
icBufferListAppend(&unack_queue_ring.slots[idx], buf);
}
diff --git a/contrib/udp2/ic_common/udp2/ic_udp2.cpp
b/contrib/udp2/ic_common/udp2/ic_udp2.cpp
index ca001646151..f56e0198b46 100644
--- a/contrib/udp2/ic_common/udp2/ic_udp2.cpp
+++ b/contrib/udp2/ic_common/udp2/ic_udp2.cpp
@@ -3049,8 +3049,14 @@ putIntoUnackQueueRing(UnackQueueRing *uqr, ICBuffer
*buf, uint64 expTime, uint64
}
else if (diff < TIMER_SPAN_LOSS)
{
- diff = diff < TIMER_SPAN_LOSS ? TIMER_SPAN_LOSS : diff;
+ diff = TIMER_SPAN_LOSS;
}
+
+ idx = (uqr->idx + diff / TIMER_SPAN_LOSS) %
UNACK_QUEUE_RING_SLOTS_NUM;
+
+#ifdef AMS_VERBOSE_LOGGING
+ LOG(INFO, "PUTTW: curtime %lu now %lu (diff %lu) expTime %lu
previdx %d, nowidx %d, nextidx %d", uqr->currentTime, now, diff, expTime,
buf->unackQueueRingSlot, uqr->idx, idx);
+#endif
}
else
{
@@ -3077,12 +3083,6 @@ putIntoUnackQueueRing(UnackQueueRing *uqr, ICBuffer
*buf, uint64 expTime, uint64
#endif
}
- idx = (uqr->idx + diff / TIMER_SPAN) % UNACK_QUEUE_RING_SLOTS_NUM;
-
-#ifdef AMS_VERBOSE_LOGGING
- LOG(INFO, "PUTTW: curtime %lu now %lu (diff %lu) expTime %lu previdx
%d, nowidx %d, nextidx %d", uqr->currentTime, now, diff, expTime,
buf->unackQueueRingSlot, uqr->idx, idx);
-#endif
-
buf->unackQueueRingSlot = idx;
unack_queue_ring.slots[idx].append(buf);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]