You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ma...@apache.org on 2025/02/24 05:53:19 UTC

(cloudberry) 07/07: Fix singlenode resource_queue test.

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

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

commit 6e82c1bdd948370550e7421ba574f0163b31cd67
Author: Jianghua Yang <yj...@gmail.com>
AuthorDate: Fri Feb 21 11:32:35 2025 +0800

    Fix singlenode resource_queue test.
---
 src/test/singlenode_regress/expected/resource_queue.out           | 6 ++++++
 src/test/singlenode_regress/init_file                             | 3 +++
 src/test/singlenode_regress/output/resource_queue_function.source | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/test/singlenode_regress/expected/resource_queue.out b/src/test/singlenode_regress/expected/resource_queue.out
index d8c00ed132..083e08f9c3 100755
--- a/src/test/singlenode_regress/expected/resource_queue.out
+++ b/src/test/singlenode_regress/expected/resource_queue.out
@@ -262,6 +262,7 @@ DECLARE c1 CURSOR FOR SELECT 1 FROM tenk1;
 DECLARE c2 CURSOR FOR SELECT 2 FROM tenk1;
 DECLARE c3 CURSOR FOR SELECT 3 FROM tenk1; -- should detect deadlock
 ERROR:  deadlock detected, locking against self
+DETAIL:  resource queue id: 56321, portal id: 3
 END;
 -- track cursor open/close count (should not deadlock)
 BEGIN;
@@ -328,6 +329,7 @@ SELECT rsqname, rsqcostlimit, rsqwaiters, rsqholders FROM pg_resqueue_status WHE
 
 DECLARE c3 CURSOR FOR SELECT * FROM tenk1 a, tenk1 b;
 ERROR:  statement requires more resources than resource queue allows
+DETAIL:  resource queue id: 56322, portal id: 3
 SELECT rsqname, rsqcostlimit, rsqwaiters, rsqholders FROM pg_resqueue_status WHERE rsqcostvalue > 0;
 ERROR:  current transaction is aborted, commands ignored until end of transaction block
 DECLARE c4 CURSOR FOR SELECT * FROM tenk1 a, tenk1 b, tenk1 c;
@@ -438,6 +440,7 @@ fetch c0;
 
 select * from rq_product;
 ERROR:  deadlock detected, locking against self
+DETAIL:  resource queue id: 56325, portal id: 0
 fetch c0;
 ERROR:  current transaction is aborted, commands ignored until end of transaction block
 abort;
@@ -469,6 +472,7 @@ fetch c0;
 
 select * from rq_product;
 ERROR:  deadlock detected, locking against self
+DETAIL:  resource queue id: 56325, portal id: 0
 fetch c0;
 ERROR:  current transaction is aborted, commands ignored until end of transaction block
 abort;
@@ -519,6 +523,7 @@ fetch c0;
 
 select * from rq_product;
 ERROR:  deadlock detected, locking against self
+DETAIL:  resource queue id: 56325, portal id: 0
 fetch c0;
 ERROR:  current transaction is aborted, commands ignored until end of transaction block
 abort;
@@ -570,6 +575,7 @@ fetch c0;
 
 select * from rq_product;
 ERROR:  deadlock detected, locking against self
+DETAIL:  resource queue id: 56325, portal id: 0
 fetch c0;
 ERROR:  current transaction is aborted, commands ignored until end of transaction block
 abort;
diff --git a/src/test/singlenode_regress/init_file b/src/test/singlenode_regress/init_file
index 8d889b384f..0f1c4768a6 100644
--- a/src/test/singlenode_regress/init_file
+++ b/src/test/singlenode_regress/init_file
@@ -141,4 +141,7 @@ s/.//gs
 m/ERROR:  can't split update for inherit table: .*/
 s/ERROR:  can't split update for inherit table: .*/ERROR:  can't split update for inherit table:/
 
+# ignore resource queue ids
+m/resource queue id: \d+/
+s/resource queue id: \d+/resource queue id: XXXX/
 -- end_matchsubs
diff --git a/src/test/singlenode_regress/output/resource_queue_function.source b/src/test/singlenode_regress/output/resource_queue_function.source
index ab31043f30..dee6dfa5e8 100644
--- a/src/test/singlenode_regress/output/resource_queue_function.source
+++ b/src/test/singlenode_regress/output/resource_queue_function.source
@@ -21,7 +21,7 @@ SET ROLE test_role;
 -- query should be assigned 125MB, but queue only allows 10MB 
 SELECT count(*) FROM test_table; 
 ERROR:  deadlock detected, locking against self
-HINT:  It is likely that a query is waiting on itself for resources. Check resource queue limits.
+DETAIL:  resource queue id: 430060, portal id: 0
 RESET ROLE;
 -- should return true
 select checkResourceQueueMemoryLimits('test_q'); 


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