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 bee2bbd5f70 udp2: index the cursor IC history table with uint32 in 
purge()
bee2bbd5f70 is described below

commit bee2bbd5f70b2b27c70b2aabf6689e63ad221da5
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 0fa95713735..ca98599978b 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