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 accf1b887debefbe7ea1b6a77875d2714f2ed0c1 Author: Huansong Fu <[email protected]> AuthorDate: Fri Dec 16 08:52:15 2022 -0800 Fix test_consume_xids where it consumes +1 to what's intended test_consume_xids(n int) is supposed to consume n xids but it actually consumes n+1. The reason is that we initialize 'xid' to be the next xid but during advancing it we'll rewrite it to be the xid that we just allocated (the "current xid"). Fixing it by making its meaning consistent. --- src/test/regress/regress_gp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/regress/regress_gp.c b/src/test/regress/regress_gp.c index 9dbcdbe4b3..21800e9584 100644 --- a/src/test/regress/regress_gp.c +++ b/src/test/regress/regress_gp.c @@ -1167,7 +1167,8 @@ test_consume_xids(PG_FUNCTION_ARGS) xid = ReadNextTransactionId(); - targetxid = xid + nxids; + /* xid is the "next xid" now, so minus one here */ + targetxid = xid + nxids - 1; while (targetxid < FirstNormalTransactionId) targetxid++; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
