Skip to content

Fix: widen MotionLayerState stat counters from uint32 to uint64#366

Merged
NJrslv merged 1 commit intoOPENGPDB_STABLEfrom
fix-motion-stat-overflow
Mar 31, 2026
Merged

Fix: widen MotionLayerState stat counters from uint32 to uint64#366
NJrslv merged 1 commit intoOPENGPDB_STABLEfrom
fix-motion-stat-overflow

Conversation

@NJrslv
Copy link
Copy Markdown
Contributor

@NJrslv NJrslv commented Mar 30, 2026

MotionLayerState accumulates stats across all MotionNodeEntry instances.
Per-node entries already use uint64 [0]. 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.

[0]

uint64 stat_total_bytes_sent; /* Bytes sent, including headers. */

MotionLayerState accumulates stats across all MotionNodeEntry instances.
Per-node entries already use uint64 [0]. 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.

[0] https://github.com/open-gpdb/gpdb/blob/e0db8c33c80117241f88cecca225c9fcd39dd28f/src/include/cdb/cdbinterconnect.h#L498
@NJrslv NJrslv merged commit 4e129eb into OPENGPDB_STABLE Mar 31, 2026
121 of 128 checks passed
@NJrslv NJrslv deleted the fix-motion-stat-overflow branch March 31, 2026 10:43
NJrslv added a commit that referenced this pull request Mar 31, 2026
MotionLayerState accumulates stats across all MotionNodeEntry instances.
Per-node entries already use uint64 [0]. 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.

[0] https://github.com/open-gpdb/gpdb/blob/e0db8c33c80117241f88cecca225c9fcd39dd28f/src/include/cdb/cdbinterconnect.h#L498
NJrslv added a commit that referenced this pull request Mar 31, 2026
MotionLayerState accumulates stats across all MotionNodeEntry instances.
Per-node entries already use uint64 [0]. 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.

[0] https://github.com/open-gpdb/gpdb/blob/e0db8c33c80117241f88cecca225c9fcd39dd28f/src/include/cdb/cdbinterconnect.h#L498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants