This is an automated email from the ASF dual-hosted git repository.

leborchuk pushed a commit to branch REL_2_STABLE
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit acf885b22fa1946f8f65c1a43d25ca2df5ce42ab
Author: Jianghua Yang <[email protected]>
AuthorDate: Tue Sep 15 01:27:21 2026 +0800

    udp2: index the cursor IC history table with uint32 in purge()
    
    CursorICHistoryTable::add() and prune() compute their bucket index as a
    uint32, but purge() iterates the table with a uint8 index. The table size
    comes from gp_interconnect_cursor_ic_table_size, which defaults to 128 but
    may be raised up to 102400, and the GUC's own description tells users to
    raise it when UDFs with many concurrent cursors hang. Any value above 255
    turns the purge loop into an infinite loop (uint8 wraps before reaching
    size) while holding the interconnect lock, which also wedges the receiver
    thread. Use uint32 to match the rest of the table.
---
 contrib/udp2/ic_common/udp2/ic_udp2_internal.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/udp2/ic_common/udp2/ic_udp2_internal.hpp 
b/contrib/udp2/ic_common/udp2/ic_udp2_internal.hpp
index 2602133a9e5..6d9dc61d9ee 100644
--- a/contrib/udp2/ic_common/udp2/ic_udp2_internal.hpp
+++ b/contrib/udp2/ic_common/udp2/ic_udp2_internal.hpp
@@ -631,7 +631,7 @@ struct CursorICHistoryTable
        }
 
        void purge() {
-               for (uint8 index = 0; index < size; index++) {
+               for (uint32 index = 0; index < size; index++) {
                        while (table[index]) {
                                CursorICHistoryEntry *trash = table[index];
                                table[index] = trash->next;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to