Skip to content

Fix the issue of duplicate counting of num_executed in gp_toolkit.gp_resgroup_status#1646

Open
fairyfar wants to merge 1 commit intoapache:mainfrom
fairyfar:resgroup
Open

Fix the issue of duplicate counting of num_executed in gp_toolkit.gp_resgroup_status#1646
fairyfar wants to merge 1 commit intoapache:mainfrom
fairyfar:resgroup

Conversation

@fairyfar
Copy link
Copy Markdown
Contributor

What does this PR do?

Fix the issue of duplicate counting of num_executed in gp_toolkit.gp_resgroup_status
This is a defect of the original GPDB.
When enabling resource group management and the transaction switches from "Assigned" to "Bypass" state, the "num_executed" counter is repeatedly counted.

Reproducing test cases:

  1. Enable resource group: set gp_resource_manager to "group".

  2. Log in with the default superuser.

  3. Execute gp_toolkit.gp_resgroup_status twice.

SELECT groupname, num_executed FROM gp_toolkit.gp_resgroup_status WHERE groupname='admin_group';
 groupname   | num_executed 
-------------+--------------
 admin_group | 31           
(1 row)
SELECT groupname, num_executed FROM gp_toolkit.gp_resgroup_status WHERE groupname='admin_group';
 groupname   | num_executed 
-------------+--------------
 admin_group | 33           
(1 row)

The test case has been added to:

‎src/test/isolation2/sql/resgroup/resgroup_bypass.sql

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


…resgroup_status

This is a defect of the original GPDB.
When enabling resource group management and the transaction switches from "Assign" to "Bypass" state, the "num_executed" counter is repeatedly counted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant