[MCOL-2142] calshowprocesslist - not showing high priority with wildcard is used Created: 2019-02-06  Updated: 2023-07-02  Resolved: 2023-07-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: David Hill (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None

Epic Link: ColumnStore Performance Improvements

 Description   

reported by a customer

I read through the documentation for user priority at https://mariadb.com/kb/en/library/columnstore-database-user-management/#user-priority-management .. Query stats and user priority are enabled for testing this.

I am wondering if the user priority actually works with the wildcard host (%), when the users are defined using the wildcard? There are numerous users defined and with priority set, but my example is with user xxxxxxx@% defined:

MariaDB [infinidb_querystats]> select user,host from mysql.user where user='xxxxxx';
-------------+

user host

-------------+

xxxxxx %

-------------+

Set user priority:

MariaDB [infinidb_querystats]> call calsetuserpriority('%','xxxxxx','high');
Query OK, 0 rows affected (0.001 sec)

MariaDB [infinidb_querystats]> select * from user_priority where user='xxxxxx';
---------------------

host user priority

---------------------

% xxxxxx HIGH

---------------------
1 row in set (0.012 sec)

Run a query as the user xxxxxx:

MariaDB [dairy]> select count from dairy_geno;
------------

count

------------

xxxxxxxxxx

------------

Check query stats table for the priority used on last query:

MariaDB [infinidb_querystats]> select user,host,priority,startTime from querystats where user='xxxxx' order by startTime DESC limit 1;
------------------------------------------------------------------+

user host priority startTime

------------------------------------------------------------------+

xxxxx mendel-master1.global.internal LOW 2019-02-05 15:16:55

------------------------------------------------------------------+
1 row in set (58.854 sec)

As you can see, priority is still showing as low.. even though user_priority table shows as high. I am wondering if it is because of the host defined? Similarly.. user priority is reflected correctly when running as the root@localhost user set as 'HIGH' priority.

Last Query run from root user:
MariaDB [infinidb_querystats]> select user,host,priority,startTime from querystats where user='root' order by startTime DESC limit 1;
------------------------------------------+

user host priority startTime

------------------------------------------+

root localhost HIGH 2019-02-05 13:43:38

------------------------------------------+

I guess I am not seeing any changes within CalShowProcessList();

UserPriority is activated, and I set a user to say 'medium' :

MariaDB [infinidb_querystats]> call calsetuserpriority('%','bwitzke','medium');
Query OK, 1 row affected (0.010 sec)

Then, while running a simple query I do not see a reflection of this while in calshowprocesslist();

it works when I specify the host such as root@localhost.. root then shows as having high priority.. just not the wildcard (%)



 Comments   
Comment by Todd Stoffel (Inactive) [ 2023-07-02 ]

The "create date" on this ticket is pre-convergence with MariaDB server. If the issue still exists in a modern version of the engine/plugin please submit a new ticket.

Generated at Thu Feb 08 02:34:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.