You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by av...@apache.org on 2025/08/04 09:33:27 UTC

(cloudberry) branch main updated (b8c6a63d61d -> 54a402cf3ed)

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

avamingli pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


    from b8c6a63d61d Implement parallel processing for window functions.
     new 1b44ecea6a9 Disable offsetnumber assertion in ginPostingListDecodeAllSegments()
     new 54a402cf3ed Add a FIXME for potential failures in other files.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/access/gin/ginpostinglist.c     | 11 ++++++++++-
 src/test/regress/expected/gin.out           |  9 +++++++++
 src/test/regress/expected/gin_optimizer.out |  9 +++++++++
 src/test/regress/sql/gin.sql                | 10 ++++++++++
 4 files changed, 38 insertions(+), 1 deletion(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 02/02: Add a FIXME for potential failures in other files.

Posted by av...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 54a402cf3ede217ca8c2d8efc98eb291744f2980
Author: Zhang Mingli <av...@gmail.com>
AuthorDate: Mon Aug 4 14:47:53 2025 +0800

    Add a FIXME for potential failures in other files.
---
 src/backend/access/gin/ginpostinglist.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/backend/access/gin/ginpostinglist.c b/src/backend/access/gin/ginpostinglist.c
index de4d4d325fd..c614c646c2b 100644
--- a/src/backend/access/gin/ginpostinglist.c
+++ b/src/backend/access/gin/ginpostinglist.c
@@ -338,11 +338,14 @@ ginPostingListDecodeAllSegments(GinPostingList *segment, int len, int *ndecoded_
 		/*
 		 * Keep this commented out.
 		 * See comments in itemptr_to_uint64().
+		 * 
+		 * FIXME: Correct like this in other files (e.g., ginpostinglist.c and gist.c)
+		 * if we can reproduce the cases.
 		 */
 #if 0
 		Assert(OffsetNumberIsValid(ItemPointerGetOffsetNumber(&segment->first)));
 #endif
-		Assert(ndecoded == 0 || ginCompareItemPointers(&segment->first, &result[ndecoded - 1]) > 0);
+			Assert(ndecoded == 0 || ginCompareItemPointers(&segment->first, &result[ndecoded - 1]) > 0);
 		result[ndecoded] = segment->first;
 		ndecoded++;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


(cloudberry) 01/02: Disable offsetnumber assertion in ginPostingListDecodeAllSegments()

Posted by av...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1b44ecea6a937cbac8eed69d0b58a33d0cd38f04
Author: Zhang Mingli <av...@gmail.com>
AuthorDate: Fri Jul 11 15:13:12 2025 +0800

    Disable offsetnumber assertion in ginPostingListDecodeAllSegments()
    
    Fix issue: https://github.com/apache/cloudberry/issues/1222
    
    As comments in itemptr_to_uint64:
    Greenplum allow 16 bits for the offsetnumber, which turns the
    below upstream assertion into an always-true comparison which
    generates a compiler warning; thus we need to keep this commented out.
    
    For sql in issue 1222, we will get assert failure as:
    
    DETAIL:  FailedAssertion("!(((_Bool) ((( ((void) ((_Bool) (! (!(((_Bool)
    (((const void*)(&segment->first) != ((void *)0)) &&
    ((&segment->first)->ip_posid != 0))))) ||
    (ExceptionalCondition("!(((_Bool) (((const void*)(&segment->first) !=
    ((void *)0)) && ((&segment->first)->ip_posid != 0))))",
    ("FailedAssertion"), "ginpostinglist.c", 338), 0)))), (
    (&segment->first)->ip_posid ) ) != ((OffsetNumber) 0)) && (( ((void)
    ((_Bool) (! (!(((_Bool) (((const void*)(&segment->first) != ((void *)0))
    && ((&segment->first)->ip_posid != 0))))) ||
    (ExceptionalCondition("!(((_Bool) (((const void*)(&segment->first) !=
    ((void *)0)) && ((&segment->first)->ip_posid != 0))))",
    ("FailedAssertion"), "ginpostinglist.c", 338), 0)))), (
    (&segment->first)->ip_posid ) ) <= ((OffsetNumber) (32768 /
    sizeof(ItemIdData)))))))", File: "ginpostinglist.c", Line: 338)
    
    Reported-by: assam258-5892 assam258@gmail.com
    Reproduced-by: Zhang Mingli avamingli@gmail.com
    Authored-by: Zhang Mingli avamingli@gmail.com
---
 src/backend/access/gin/ginpostinglist.c     |  6 ++++++
 src/test/regress/expected/gin.out           |  9 +++++++++
 src/test/regress/expected/gin_optimizer.out |  9 +++++++++
 src/test/regress/sql/gin.sql                | 10 ++++++++++
 4 files changed, 34 insertions(+)

diff --git a/src/backend/access/gin/ginpostinglist.c b/src/backend/access/gin/ginpostinglist.c
index 8b166c738c7..de4d4d325fd 100644
--- a/src/backend/access/gin/ginpostinglist.c
+++ b/src/backend/access/gin/ginpostinglist.c
@@ -335,7 +335,13 @@ ginPostingListDecodeAllSegments(GinPostingList *segment, int len, int *ndecoded_
 		}
 
 		/* copy the first item */
+		/*
+		 * Keep this commented out.
+		 * See comments in itemptr_to_uint64().
+		 */
+#if 0
 		Assert(OffsetNumberIsValid(ItemPointerGetOffsetNumber(&segment->first)));
+#endif
 		Assert(ndecoded == 0 || ginCompareItemPointers(&segment->first, &result[ndecoded - 1]) > 0);
 		result[ndecoded] = segment->first;
 		ndecoded++;
diff --git a/src/test/regress/expected/gin.out b/src/test/regress/expected/gin.out
index 65730adcfe0..8454ee25bb8 100644
--- a/src/test/regress/expected/gin.out
+++ b/src/test/regress/expected/gin.out
@@ -310,3 +310,12 @@ select count(*) from t_gin_test_tbl where j @> '{}'::int[];
 reset enable_seqscan;
 reset enable_bitmapscan;
 drop table t_gin_test_tbl;
+--
+-- Github issue: https://github.com/apache/cloudberry/issues/1222
+--
+begin;
+create table t_issue_1222(i int4[]) with (appendonly=true);
+create index t_issue_1222_idx on t_issue_1222 using gin (i)
+  with (fastupdate = on, gin_pending_list_limit = 4096);
+insert into t_issue_1222 select array[1, 2, g] from generate_series(1, 400000) g;
+abort;
diff --git a/src/test/regress/expected/gin_optimizer.out b/src/test/regress/expected/gin_optimizer.out
index ef5c879df76..f7df2cf49e8 100644
--- a/src/test/regress/expected/gin_optimizer.out
+++ b/src/test/regress/expected/gin_optimizer.out
@@ -308,3 +308,12 @@ select count(*) from t_gin_test_tbl where j @> '{}'::int[];
 reset enable_seqscan;
 reset enable_bitmapscan;
 drop table t_gin_test_tbl;
+--
+-- Github issue: https://github.com/apache/cloudberry/issues/1222
+--
+begin;
+create table t_issue_1222(i int4[]) with (appendonly=true);
+create index t_issue_1222_idx on t_issue_1222 using gin (i)
+  with (fastupdate = on, gin_pending_list_limit = 4096);
+insert into t_issue_1222 select array[1, 2, g] from generate_series(1, 400000) g;
+abort;
diff --git a/src/test/regress/sql/gin.sql b/src/test/regress/sql/gin.sql
index db702e12adf..d52f19e2d36 100644
--- a/src/test/regress/sql/gin.sql
+++ b/src/test/regress/sql/gin.sql
@@ -172,3 +172,13 @@ reset enable_seqscan;
 reset enable_bitmapscan;
 
 drop table t_gin_test_tbl;
+
+--
+-- Github issue: https://github.com/apache/cloudberry/issues/1222
+--
+begin;
+create table t_issue_1222(i int4[]) with (appendonly=true);
+create index t_issue_1222_idx on t_issue_1222 using gin (i)
+  with (fastupdate = on, gin_pending_list_limit = 4096);
+insert into t_issue_1222 select array[1, 2, g] from generate_series(1, 400000) g;
+abort;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org