This is an automated email from the ASF dual-hosted git repository.
reshke 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 857723b08fb Widen MotionLayerState stat counters from uint32 to uint64
(#1647)
857723b08fb is described below
commit 857723b08fb3ae44f5435cb208ceac631d6c9e59
Author: NJrslv <[email protected]>
AuthorDate: Mon Mar 30 13:54:48 2026 +0300
Widen MotionLayerState stat counters from uint32 to uint64 (#1647)
MotionLayerState accumulates stats across all MotionNodeEntry instances.
Per-node entries already use uint64. The global sum ≥ any individual
node, so it overflows first — at 4GB. Fix by widening to uint64.
Also fix the debug elog() format specifiers to match.
---
src/backend/cdb/motion/cdbmotion.c | 4 ++--
src/include/cdb/cdbinterconnect.h | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/backend/cdb/motion/cdbmotion.c
b/src/backend/cdb/motion/cdbmotion.c
index 24b112cd1bd..ad3b1c49a65 100644
--- a/src/backend/cdb/motion/cdbmotion.c
+++ b/src/backend/cdb/motion/cdbmotion.c
@@ -133,8 +133,8 @@ RemoveMotionLayer(MotionLayerState *mlStates)
/* Emit statistics to log */
if (gp_log_interconnect >= GPVARS_VERBOSITY_VERBOSE)
elog(LOG, "RemoveMotionLayer(): dumping stats\n"
- " Sent: %9u chunks %9u total bytes %9u tuple
bytes\n"
- " Received: %9u chunks %9u total bytes %9u tuple
bytes; "
+ " Sent: %9" INT64_MODIFIER "u chunks %9"
INT64_MODIFIER "u total bytes %9" INT64_MODIFIER "u tuple bytes\n"
+ " Received: %9" INT64_MODIFIER "u chunks %9"
INT64_MODIFIER "u total bytes %9" INT64_MODIFIER "u tuple bytes; "
"%9u chunkproc calls\n",
mlStates->stat_total_chunks_sent,
mlStates->stat_total_bytes_sent,
diff --git a/src/include/cdb/cdbinterconnect.h
b/src/include/cdb/cdbinterconnect.h
index 5204d4c1b94..c6c64de9590 100644
--- a/src/include/cdb/cdbinterconnect.h
+++ b/src/include/cdb/cdbinterconnect.h
@@ -154,13 +154,13 @@ typedef struct MotionLayerState
/*
* GLOBAL MOTION-LAYER STATISTICS
*/
- uint32 stat_total_chunks_sent; /* Tuple-chunks sent. */
- uint32 stat_total_bytes_sent; /* Bytes sent, including
headers. */
- uint32 stat_tuple_bytes_sent; /* Bytes of pure tuple-data
sent. */
+ uint64 stat_total_chunks_sent; /* Tuple-chunks sent. */
+ uint64 stat_total_bytes_sent; /* Bytes sent, including
headers. */
+ uint64 stat_tuple_bytes_sent; /* Bytes of pure tuple-data
sent. */
- uint32 stat_total_chunks_recvd;/* Tuple-chunks received. */
- uint32 stat_total_bytes_recvd; /* Bytes received, including
headers. */
- uint32 stat_tuple_bytes_recvd; /* Bytes of pure tuple-data
received. */
+ uint64 stat_total_chunks_recvd;/* Tuple-chunks received. */
+ uint64 stat_total_bytes_recvd; /* Bytes received, including
headers. */
+ uint64 stat_tuple_bytes_recvd; /* Bytes of pure tuple-data
received. */
uint32 stat_total_chunkproc_calls; /* Calls to
processIncomingChunks() */
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]