Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](grace-exit) Stop incorrectly of reportwork cause heap use after free #32929

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

xinyiZzz
Copy link
Contributor

Proposed changes

fix stop incorrectly of reportwork cause heap use after free. similar pr: #32205

==118151==ERROR: AddressSanitizer: heap-use-after-free on address 0x610000079a50 at pc 0x5587c545a0a8 bp 0x7f4450d4e1c0 sp 0x7f4450d4e1b8
READ of size 8 at 0x610000079a50 thread T1323 (REPORT_TASK-119)
    #0 0x5587c545a0a7 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data() const /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187:28
    #1 0x5587c545a0a7 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::data() const /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:2319:16
    #2 0x5587c545a0a7 in std::hash<doris::TNetworkAddress>::operator()(doris::TNetworkAddress const&) const /root/doris/be/src/util/hash_util.hpp:379:55
    #3 0x5587c545a0a7 in std::__detail::_Hash_code_base<doris::TNetworkAddress, std::pair<doris::TNetworkAddress const, std::__cxx11::list<void*, std::allocator<void*> > >, std::__detail::_Select1st, std::hash<doris::TNetworkAddress>, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, true>::_M_hash_code(doris::TNetworkAddress const&) const /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable_policy.h:1217:9
    #4 0x5587c545a0a7 in std::_Hashtable<doris::TNetworkAddress, std::pair<doris::TNetworkAddress const, std::__cxx11::list<void*, std::allocator<void*> > >, std::allocator<std::pair<doris::TNetworkAddress const, std::__cxx11::list<void*, std::allocator<void*> > > >, st
d::__detail::_Select1st, std::equal_to<doris::TNetworkAddress>, std::hash<doris::TNetworkAddress>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find(do
ris::TNetworkAddress const&) /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/hashtable.h:1570:34
    #5 0x5587c54560d4 in std::unordered_map<doris::TNetworkAddress, std::__cxx11::list<void*, std::allocator<void*> >, std::hash<doris::TNetworkAddress>, std::equal_to<doris::TNetworkAddress>, std::allocator<std::pair<doris::TNetworkAddress const, std::__cxx11::list<voi
d*, std::allocator<void*> > > > >::find(doris::TNetworkAddress const&) /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/unordered_map.h:869:21
    #6 0x5587c54560d4 in doris::ClientCacheHelper::_get_client_from_cache(doris::TNetworkAddress const&, void**) /root/doris/be/src/runtime/client_cache.cpp:44:38
    #7 0x5587c545685e in doris::ClientCacheHelper::get_client(doris::TNetworkAddress const&, std::function<doris::ThriftClientImpl* (doris::TNetworkAddress const&, void**)>&, void**, int) /root/doris/be/src/runtime/client_cache.cpp:61:5
    #8 0x5587c2f60591 in doris::ClientCache<doris::FrontendServiceClient>::get_client(doris::TNetworkAddress const&, doris::FrontendServiceClient**, int) /root/doris/be/src/runtime/client_cache.h:243:37
    #9 0x5587c2f60591 in doris::ClientConnection<doris::FrontendServiceClient>::ClientConnection(doris::ClientCache<doris::FrontendServiceClient>*, doris::TNetworkAddress const&, int, doris::Status*, int) /root/doris/be/src/runtime/client_cache.h:165:38
    #10 0x5587c2f5c955 in doris::MasterServerClient::report(doris::TReportRequest const&, doris::TMasterResult*) /root/doris/be/src/agent/utils.cpp:117:31
    #11 0x5587c2ef22c6 in doris::(anonymous namespace)::handle_report(doris::TReportRequest const&, doris::TMasterInfo const&, std::basic_string_view<char, std::char_traits<char> >) /root/doris/be/src/agent/task_worker_pool.cpp:355:53
    #12 0x5587c2ef1cbf in doris::report_task_callback(doris::TMasterInfo const&) /root/doris/be/src/agent/task_worker_pool.cpp:985:17
    #13 0x5587c2f26226 in std::function<void ()>::operator()() const /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:560:9
    #14 0x5587c2f26226 in doris::ReportWorker::ReportWorker(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, doris::TMasterInfo const&, int, std::function<void ()>)::$_0::operator()() const /root/doris/be/src/agent/task_worker_pool.cpp:67
1:13
    #15 0x5587c2f26226 in void std::__invoke_impl<void, doris::ReportWorker::ReportWorker(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, doris::TMasterInfo const&, int, std::function<void ()>)::$_0&>(std::__invoke_other, doris::ReportWo
rker::ReportWorker(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, doris::TMasterInfo const&, int, std::function<void ()>)::$_0&) /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61:14
    #16 0x5587c2f26226 in std::enable_if<is_invocable_r_v<void, doris::ReportWorker::ReportWorker(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, doris::TMasterInfo const&, int, std::function<void ()>)::$_0&>, void>::type std::__invoke_r
<void, doris::ReportWorker::ReportWorker(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, doris::TMasterInfo const&, int, std::function<void ()>)::$_0&>(doris::ReportWorker::ReportWorker(std::__cxx11::basic_stri

0x610000079a50 is located 16 bytes inside of 192-byte region [0x610000079a40,0x610000079b00)
freed by thread T0 here:
    #0 0x5587c2e6780d in operator delete(void*) (/mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P1/Cluster0/be/lib/doris_be+0x133f680d) (BuildId: 77604ccbab68e052)
    #1 0x5587c54a3a00 in doris::ExecEnv::destroy() /root/doris/be/src/runtime/exec_env_init.cpp:669:5
    #2 0x5587c2e70158 in main /root/doris/be/src/service/doris_main.cpp:622:15
    #3 0x7f4ad5624082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

previously allocated by thread T0 here:
    #0 0x5587c2e66fad in operator new(unsigned long) (/mnt/ssd01/pipline/OpenSourceDoris/clusterEnv/P1/Cluster0/be/lib/doris_be+0x133f5fad) (BuildId: 77604ccbab68e052)
    #1 0x5587c5495539 in doris::ExecEnv::_init(std::vector<doris::StorePath, std::allocator<doris::StorePath> > const&, std::vector<doris::StorePath, std::allocator<doris::StorePath> > const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /root/doris/be/src/runtime/exec_env_init.cpp:227:20
    #2 0x5587c549283d in doris::ExecEnv::init(doris::ExecEnv*, std::vector<doris::StorePath, std::allocator<doris::StorePath> > const&, std::vector<doris::StorePath, std::allocator<doris::StorePath> > const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /root/doris/be/src/runtime/exec_env_init.cpp:147:17
    #3 0x5587c2e6d7ef in main /root/doris/be/src/service/doris_main.cpp:521:14
    #4 0x7f4ad5624082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@xinyiZzz
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TPC-H: Total hot run time: 38413 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 04bbaf32bf329781a9d3ff6255a7874c48276842, data reload: false

------ Round 1 ----------------------------------
q1	17934	4278	4222	4222
q2	2429	163	158	158
q3	11472	1134	1211	1134
q4	10545	782	762	762
q5	7581	3091	3051	3051
q6	209	130	128	128
q7	1065	630	599	599
q8	9343	1972	2019	1972
q9	7261	6639	6576	6576
q10	8477	3481	3598	3481
q11	433	228	221	221
q12	375	202	199	199
q13	17794	2894	2889	2889
q14	232	201	204	201
q15	520	485	467	467
q16	509	375	371	371
q17	961	554	625	554
q18	7187	6456	6506	6456
q19	1556	1464	1423	1423
q20	573	285	256	256
q21	3712	3043	2984	2984
q22	358	322	309	309
Total cold run time: 110526 ms
Total hot run time: 38413 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4114	4131	4098	4098
q2	327	237	237	237
q3	2976	2847	2839	2839
q4	1809	1625	1549	1549
q5	5330	5320	5321	5320
q6	204	120	120	120
q7	2282	1891	1856	1856
q8	3158	3320	3271	3271
q9	8697	8710	8681	8681
q10	3834	3775	3739	3739
q11	571	452	459	452
q12	747	564	547	547
q13	16904	2843	2873	2843
q14	284	245	248	245
q15	497	456	458	456
q16	473	440	457	440
q17	1738	1508	1471	1471
q18	7357	7096	7175	7096
q19	1604	1506	1562	1506
q20	1917	1723	1685	1685
q21	4960	4782	4599	4599
q22	526	427	472	427
Total cold run time: 70309 ms
Total hot run time: 53477 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.24% (8739/24796)
Line Coverage: 27.02% (71524/264670)
Region Coverage: 26.27% (37120/141288)
Branch Coverage: 23.17% (18978/81916)
Coverage Report: http://coverage.selectdb-in.cc/coverage/04bbaf32bf329781a9d3ff6255a7874c48276842_04bbaf32bf329781a9d3ff6255a7874c48276842/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 181865 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 04bbaf32bf329781a9d3ff6255a7874c48276842, data reload: false

query1	934	383	357	357
query2	6536	2076	1954	1954
query3	6700	215	221	215
query4	31692	21336	21230	21230
query5	4297	419	405	405
query6	271	179	184	179
query7	4629	292	293	292
query8	239	167	170	167
query9	9281	2388	2383	2383
query10	557	248	250	248
query11	15153	14187	14158	14158
query12	138	108	96	96
query13	1628	423	431	423
query14	10137	7814	7882	7814
query15	301	211	189	189
query16	8250	268	266	266
query17	1989	582	561	561
query18	2128	293	296	293
query19	357	148	146	146
query20	97	83	89	83
query21	203	132	123	123
query22	5074	4840	4795	4795
query23	33540	32659	32767	32659
query24	11881	2886	2884	2884
query25	618	372	374	372
query26	1753	158	154	154
query27	3006	343	350	343
query28	7956	1921	1867	1867
query29	1019	633	619	619
query30	314	149	147	147
query31	960	741	721	721
query32	91	53	55	53
query33	744	248	241	241
query34	1145	477	487	477
query35	838	611	613	611
query36	1030	860	902	860
query37	268	65	67	65
query38	3535	3441	3390	3390
query39	1476	1457	1426	1426
query40	299	115	121	115
query41	52	48	47	47
query42	112	97	96	96
query43	487	467	441	441
query44	1149	731	718	718
query45	289	270	259	259
query46	1128	702	708	702
query47	1946	1889	1866	1866
query48	446	370	374	370
query49	1244	358	341	341
query50	771	380	374	374
query51	6696	6606	6524	6524
query52	117	86	102	86
query53	352	278	283	278
query54	328	243	235	235
query55	93	82	83	82
query56	250	229	230	229
query57	1214	1162	1147	1147
query58	234	221	218	218
query59	2774	2657	2577	2577
query60	264	249	261	249
query61	114	112	110	110
query62	691	451	476	451
query63	301	280	274	274
query64	6932	4183	4039	4039
query65	3100	3043	3047	3043
query66	1488	401	380	380
query67	15342	14794	14735	14735
query68	8639	541	542	541
query69	630	381	395	381
query70	1289	1135	1105	1105
query71	518	281	265	265
query72	6280	2727	2543	2543
query73	737	319	318	318
query74	8464	6497	6423	6423
query75	3927	2234	2267	2234
query76	5251	916	891	891
query77	630	257	254	254
query78	10876	10173	10197	10173
query79	7982	506	518	506
query80	1522	369	383	369
query81	516	221	214	214
query82	744	88	79	79
query83	218	144	145	144
query84	285	80	80	80
query85	1342	317	312	312
query86	418	287	296	287
query87	3688	3526	3552	3526
query88	4412	2398	2400	2398
query89	514	369	362	362
query90	1971	174	172	172
query91	175	136	139	136
query92	56	51	47	47
query93	6356	515	495	495
query94	1128	182	178	178
query95	431	333	327	327
query96	619	276	271	271
query97	2674	2511	2495	2495
query98	229	213	202	202
query99	1194	885	914	885
Total cold run time: 312693 ms
Total hot run time: 181865 ms

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 04bbaf32bf329781a9d3ff6255a7874c48276842 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       13.5 seconds inserted 10000000 Rows, about 740K ops/s

Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 27, 2024
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@zclllyybb zclllyybb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei yiguolei merged commit 742a3f6 into apache:master Mar 28, 2024
27 of 31 checks passed
Jibing-Li added a commit that referenced this pull request Mar 29, 2024
* [fix](merge cloud) Fix cloud be set be tag map (#32864)

* [chore] Add gavinchou to collaborators (#32881)

* [chore](show) support statement to show views from table (#32358)

MySQL [test]> show views;
+----------------+
| Tables_in_test |
+----------------+
| t1_view        |
| t2_view        |
+----------------+
2 rows in set (0.00 sec)

MySQL [test]> show views like '%t1%';
+----------------+
| Tables_in_test |
+----------------+
| t1_view        |
+----------------+
1 row in set (0.01 sec)

MySQL [test]> show views where create_time > '2024-03-18';
+----------------+
| Tables_in_test |
+----------------+
| t2_view        |
+----------------+
1 row in set (0.02 sec)

* [Enhancement](ranger) Disable some permission operations when Ranger or LDAP are enabled (#32538)

Disable some permission operations when Ranger or LDAP are enabled.

* [chore](ci) exclude unstable trino_connector case (#32892)

Co-authored-by: stephen <[email protected]>

* [fix](Nereids) NPE when create table with implicit index type (#32893)

* [improvement](mtmv) Support more join types for query rewriting by materialized view (#32685)

This pattern of rewriting is supported for multi-table joins and supported join types is as following:

INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
LEFT SEMI JOIN
RIGHT SEMI JOIN
LEFT ANTI JOIN
RIGHT ANTI JOIN

* [Serde](Variant) support arrow serialization for varint type (#32780)

* [fix](multicatalog) fix no data error when read hive table on cosn (#32815)

Currently, when reading a hive on cosn table, doris return empty result, but the table has data.
iceberg on cosn is ok.
The reason is misuse of cosn's file sytem. according to cosn's doc, its fs.cosn.impl should be org.apache.hadoop.fs.CosFileSystem

* [fix](nereids)EliminateGroupByConstant should replace agg's output after removing constant group by keys (#32878)

* [Fix](executor)Fix regression test for test_active_queries/test_backend_active_tasks #32899

* [fix](iceberg) fix iceberg catalog bug and p2 test cases (#32898)

1. Fix iceberg catalog bug

    This PR #30198 change the logic of `IcebergHMSExternalCatalog.java`,
    to get locationUrl by calling hive metastore's `getCatalog()` method.
    But this method only exists in hive 3+. So it will fail if we using hive 2.x.

    I temporary remove this logic, because this logic is only used from iceberg table writing.
    Which is still under development. We will rethink this logic later.

2. Fix test cases

    Some of P2 test cases missed `order_qt`. And because the output format of the floating point
    type is changed, some result in `out` files need to be regenerated.

* [revert](jni) revert part of #32455 (#32904)

* [fix](spill) Avoid releasing resources while spill tasks are executing (#32783)

* [chore](log) print query id before logging profile in be.INFO (#32922)

* [fix](grace-exit) Stop incorrectly of reportwork cause heap use after free #32929

* [improvement](decommission be) decommission check replica num (#32748)

* [fix](arrow-flight) Fix reach limit of connections error (#32911)

Fix Reach limit of connections error
in fe.conf , arrow_flight_token_cache_size is mandatory less than qe_max_connection/2. arrow flight sql is a stateless protocol, connection is usually not actively disconnected, bearer token is evict from the cache will unregister ConnectContext.

Fix ConnectContext.command not be reset to COM_SLEEP in time, this will result in frequent kill connection after query timeout.

Fix bearer token evict log and exception.

TODO: use arrow flight session: https://mail.google.com/mail/u/0/#inbox/FMfcgzGxRdxBLQLTcvvtRpqsvmhrHpdH

* [bugfix](cloud) few variable not initialized (#32868)

../../cloud/src/recycler/meta_checker.cpp
can cause uninitialised memory read.

* [fix](arrow-flight) Fix arrow flight sql compatible with JDK 17 and upgrade arrow 15.0.2 (#32796)

--add-opens=java.base/java.nio=ALL-UNNAMED, see: https://arrow.apache.org/docs/java/install.html#java-compatibility
groovy use flight sql connection to execute query SUM(MAX(c1) OVER (PARTITION BY)) report error: AGGREGATE clause must not contain analytic expressions, but no problem in Java execute it with jdbc::arrow-flight-sql.
groovy not support print arrow array type, throw IndexOutOfBoundsException.
"arrow_flight_sql" not support two phase read
./run-regression-test.sh --run --clean -g arrow_flight_sql

* [fix](spill) SpillStream's writer maybe may not have been finalized (#32931)

* [improvement](spill) Disable DistinctStreamingAgg when spill is enabled (#32932)

* [Improve](inverted_index) update clucene and improve array inverted index writer  (#32436)

* [Performance](exec) replace SipHash in function by XXHash (#32919)

* [feature](agg) add aggregate function sum0 (#32541)

* [improvement](mtmv) Support to get tables in materialized view when collecting table in plan (#32797)

Support to get tables in materialized view when collecting table in plan

table scehma as fllowing:

create materialized view mv1
BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL
DISTRIBUTED BY RANDOM BUCKETS 1 
PROPERTIES ('replication_num' = '1')
 as 
select 
  t1.c1, 
  t3.c2 
from 
  table1 t1 
  inner join table3 t3 on t1.c1 = t3.c2

if get table from the plan as follwoing, we can get [table1, table3, table2], the mv1 is expanded to get base tables;

SELECT 
  mv1.*, 
  uuid() 
FROM 
  mv1 LEFT SEMI 
  JOIN table2 ON mv1.c1 = table2.c1 
WHERE 
  mv1.c1 IN (
    SELECT 
      c1 
    FROM 
      table2
  ) 
  OR mv1.c1 < 10

* [enhance](mtmv)support olap table partition column is null (#32698)

* [enhancement](cloud) add table version to cloud (#32738)

Add table version to cloud.

In Fe:
Get: If Fe is cloud mode, get table version from meta service.
Update: Op drop/replace temp partition, commit transaction.

In meta service:
Add: create Index. init value is 1.
Remove: by recycler.
Update: commit/drop partition rpc, commit txn rpc. Atomic++.

* [fix](cloud) schema change from not null to null (#32913)

1. Use equals instead of == for type comparing
2. null bitmap size is reisze by size of ref column.

* [feature](Nereids): add ColumnPruningPostProcessor. (#32800)

* [case](rowpolicy)fix row policy has been exist (#32880)

* [fix](pipeline) fix use error row desc when origin block clear (#32803)

* [fix](Nereids) support variant column with index when create table (#32948)

* [opt](Nereids) support create table with variant type (#32953)

* [test](insert-overwrite) Add insert overwrite auto detect concurrency cases (#32935)

* [fix](compile) fe cannot compile in idea (#32955)

* [enhancement](plsql) Support select * from routines (#32866)

Support show of plsql procedure using select * from routines.

* [fix](trino-connector) fix `NoClassDefFoundError` of hudi `Utils` class (#32846)

Due to the change of this PR #32455 , the `trino-connector-scanner` package cannot access the `hudi_scanner` package, so the exception NoclassDeffounderror will appear.

We need to write a separate Utils class.

* [exec](column) change some complex column move to noexcept (#32954)

* [Enhancement](data skew) extends show data skew (#32732)

* [chore](test) let suite compatible with Nereids (#32964)

* Support identical column name in different index. (#32792)

* Limit the max string length to 1024 while collecting column stats to control BE memory usage. (#32470)

* [fix](merge-iterator) fix NOT_IMPLEMENTED_ERROR when read next block view (#32961)

* [improvement](executor)Add tag property for workload group #32874

* [fix](auth)unified workload and resource permission logic (#32907)

- `Grant resource` can no longer grant global `usage_priv`
-  `grant resource %` instead of `grant resource *`

before change:
```
grant usage_priv on resource * to f;
show grants for f\G
*************************** 1. row ***************************
      UserIdentity: 'f'@'%'
           Comment: 
          Password: No
             Roles: 
       GlobalPrivs: Usage_priv 
      CatalogPrivs: NULL
     DatabasePrivs: internal.information_schema: Select_priv ; internal.mysql: Select_priv 
        TablePrivs: NULL
          ColPrivs: NULL
     ResourcePrivs: NULL
 CloudClusterPrivs: NULL
WorkloadGroupPrivs: normal: Usage_priv 
```
after change
```
grant usage_priv on resource '%' to f;
show grants for f\G
*************************** 1. row ***************************
      UserIdentity: 'f'@'%'
           Comment: 
          Password: No
             Roles: 
       GlobalPrivs: NULL
      CatalogPrivs: NULL
     DatabasePrivs: internal.information_schema: Select_priv ; internal.mysql: Select_priv 
        TablePrivs: NULL
          ColPrivs: NULL
     ResourcePrivs: %: Usage_priv 
 CloudClusterPrivs: NULL
WorkloadGroupPrivs: normal: Usage_priv 

```

---------

Co-authored-by: yujun <[email protected]>
Co-authored-by: Gavin Chou <[email protected]>
Co-authored-by: xy720 <[email protected]>
Co-authored-by: yongjinhou <[email protected]>
Co-authored-by: Dongyang Li <[email protected]>
Co-authored-by: stephen <[email protected]>
Co-authored-by: morrySnow <[email protected]>
Co-authored-by: seawinde <[email protected]>
Co-authored-by: lihangyu <[email protected]>
Co-authored-by: Yulei-Yang <[email protected]>
Co-authored-by: starocean999 <[email protected]>
Co-authored-by: wangbo <[email protected]>
Co-authored-by: Mingyu Chen <[email protected]>
Co-authored-by: Jerry Hu <[email protected]>
Co-authored-by: zhiqiang <[email protected]>
Co-authored-by: Xinyi Zou <[email protected]>
Co-authored-by: Vallish Pai <[email protected]>
Co-authored-by: amory <[email protected]>
Co-authored-by: HappenLee <[email protected]>
Co-authored-by: Jensen <[email protected]>
Co-authored-by: zhangdong <[email protected]>
Co-authored-by: Yongqiang YANG <[email protected]>
Co-authored-by: jakevin <[email protected]>
Co-authored-by: Mryange <[email protected]>
Co-authored-by: zclllyybb <[email protected]>
Co-authored-by: Tiewei Fang <[email protected]>
Co-authored-by: Xin Liao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants