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

[Enhancement] add information_schema backend_tablets table #49317

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DongLiang-0
Copy link
Contributor

@DongLiang-0 DongLiang-0 commented Mar 20, 2025

What problem does this PR solve?

Add information_schema.backend_tablets table to record the metadata information of the tablet.

Issue Number: close #48892

mysql> desc backend_tablets;
+--------------------+---------+------+-------+---------+-------+
| Field              | Type    | Null | Key   | Default | Extra |
+--------------------+---------+------+-------+---------+-------+
| BE_ID              | bigint  | Yes  | false | NULL    |       |
| TABLET_ID          | bigint  | Yes  | false | NULL    |       |
| REPLICA_ID         | bigint  | Yes  | false | NULL    |       |
| PARTITION_ID       | bigint  | Yes  | false | NULL    |       |
| TABLET_PATH        | text    | Yes  | false | NULL    |       |
| TABLET_LOCAL_SIZE  | bigint  | Yes  | false | NULL    |       |
| TABLET_REMOTE_SIZE | bigint  | Yes  | false | NULL    |       |
| VERSION_COUNT      | bigint  | Yes  | false | NULL    |       |
| SEGMENT_COUNT      | bigint  | Yes  | false | NULL    |       |
| NUM_COLUMNS        | bigint  | Yes  | false | NULL    |       |
| ROW_SIZE           | bigint  | Yes  | false | NULL    |       |
| COMPACTION_SCORE   | int     | Yes  | false | NULL    |       |
| COMPRESS_KIND      | text    | Yes  | false | NULL    |       |
| IS_USED            | boolean | Yes  | false | NULL    |       |
| IS_ALTER_FAILED    | boolean | Yes  | false | NULL    |       |
+--------------------+---------+------+-------+---------+-------+

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Mar 20, 2025

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@DongLiang-0 DongLiang-0 marked this pull request as draft March 20, 2025 10:00
@DongLiang-0 DongLiang-0 changed the title [Enhancement] add information_schema backend_tablets table which cont… [Enhancement] add information_schema backend_tablets table Mar 20, 2025
@DongLiang-0 DongLiang-0 marked this pull request as ready for review March 20, 2025 10:50
@DongLiang-0
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 83.09% (1081/1301)
Line Coverage: 66.07% (18007/27253)
Region Coverage: 65.43% (8867/13551)
Branch Coverage: 55.28% (4774/8636)
Coverage Report: http://coverage.selectdb-in.cc/coverage/528781e8c6f25443f9a4f309aba31a019c99a864_528781e8c6f25443f9a4f309aba31a019c99a864_cloud/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	24263	5013	4975	4975
q2	2051	306	175	175
q3	10392	1261	691	691
q4	10240	1054	569	569
q5	7686	2459	2348	2348
q6	184	160	128	128
q7	939	718	616	616
q8	9311	1352	1099	1099
q9	6842	5134	5206	5134
q10	6810	2331	1899	1899
q11	479	282	253	253
q12	349	354	217	217
q13	17765	3661	3032	3032
q14	222	223	206	206
q15	549	494	491	491
q16	638	601	571	571
q17	577	869	356	356
q18	7756	7411	7200	7200
q19	1755	957	549	549
q20	320	322	199	199
q21	4160	3399	2536	2536
q22	1036	1018	998	998
Total cold run time: 114324 ms
Total hot run time: 34242 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5163	5049	5058	5049
q2	248	339	229	229
q3	2178	2716	2291	2291
q4	1456	1859	1420	1420
q5	4554	4416	4417	4416
q6	224	179	126	126
q7	2005	1944	1766	1766
q8	2727	2679	2581	2581
q9	7342	7283	7071	7071
q10	3037	3185	2732	2732
q11	601	514	485	485
q12	722	780	615	615
q13	3515	3869	3303	3303
q14	291	318	297	297
q15	526	481	477	477
q16	646	683	662	662
q17	1154	1613	1364	1364
q18	7848	7679	7538	7538
q19	811	860	1101	860
q20	1993	1979	1814	1814
q21	5341	4932	4780	4780
q22	1111	1064	1004	1004
Total cold run time: 53493 ms
Total hot run time: 50880 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 195457 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 528781e8c6f25443f9a4f309aba31a019c99a864, data reload: false

query1	1435	1064	1031	1031
query2	6272	1914	1898	1898
query3	11016	4654	4591	4591
query4	53511	25742	23564	23564
query5	4994	610	488	488
query6	341	201	183	183
query7	4874	500	270	270
query8	325	252	243	243
query9	5548	2564	2579	2564
query10	408	302	263	263
query11	15272	14990	14810	14810
query12	151	111	101	101
query13	1017	503	405	405
query14	10793	7336	7819	7336
query15	201	212	189	189
query16	7113	664	449	449
query17	1108	741	571	571
query18	1638	420	339	339
query19	199	197	171	171
query20	137	126	121	121
query21	211	135	108	108
query22	4460	4700	4540	4540
query23	33832	33445	33412	33412
query24	6107	2433	2457	2433
query25	492	483	436	436
query26	732	269	141	141
query27	1808	501	321	321
query28	2791	2456	2441	2441
query29	573	566	445	445
query30	279	230	186	186
query31	876	867	804	804
query32	72	65	60	60
query33	441	382	345	345
query34	759	835	493	493
query35	805	826	749	749
query36	948	997	887	887
query37	129	103	76	76
query38	4221	4130	4163	4130
query39	1507	1462	1425	1425
query40	203	117	102	102
query41	54	51	49	49
query42	117	103	103	103
query43	495	507	479	479
query44	1315	811	810	810
query45	175	177	167	167
query46	852	1044	649	649
query47	1849	1935	1781	1781
query48	390	414	306	306
query49	684	508	429	429
query50	691	758	420	420
query51	4355	4323	4271	4271
query52	105	107	98	98
query53	237	254	182	182
query54	492	494	417	417
query55	86	87	83	83
query56	286	270	272	270
query57	1179	1203	1128	1128
query58	241	249	241	241
query59	2646	2799	2734	2734
query60	295	276	289	276
query61	132	127	126	126
query62	718	744	679	679
query63	216	191	183	183
query64	1514	1062	728	728
query65	4597	4486	4512	4486
query66	725	397	293	293
query67	16041	15663	15488	15488
query68	7196	870	498	498
query69	522	301	273	273
query70	1167	1133	1118	1118
query71	493	287	264	264
query72	5871	5160	5283	5160
query73	1471	657	342	342
query74	9310	9265	8917	8917
query75	3949	3245	2880	2880
query76	4317	1234	739	739
query77	678	361	277	277
query78	10103	10132	9326	9326
query79	2719	807	563	563
query80	675	518	446	446
query81	489	270	221	221
query82	671	127	91	91
query83	248	179	151	151
query84	282	97	74	74
query85	787	370	321	321
query86	348	305	272	272
query87	4513	4430	4511	4430
query88	3347	2218	2230	2218
query89	404	310	275	275
query90	1981	204	207	204
query91	141	144	112	112
query92	75	60	59	59
query93	1388	1058	579	579
query94	680	408	294	294
query95	355	276	262	262
query96	477	575	269	269
query97	3371	3474	3319	3319
query98	229	207	208	207
query99	1439	1392	1299	1299
Total cold run time: 297782 ms
Total hot run time: 195457 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.73 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 528781e8c6f25443f9a4f309aba31a019c99a864, data reload: false

query1	0.04	0.03	0.03
query2	0.14	0.11	0.11
query3	0.34	0.20	0.19
query4	1.59	0.19	0.20
query5	0.64	0.60	0.62
query6	1.18	0.73	0.71
query7	0.02	0.02	0.02
query8	0.06	0.04	0.05
query9	0.62	0.53	0.52
query10	0.58	0.59	0.57
query11	0.26	0.12	0.13
query12	0.25	0.12	0.13
query13	0.64	0.62	0.63
query14	2.85	2.75	2.82
query15	1.01	0.87	0.88
query16	0.37	0.39	0.38
query17	1.01	1.08	1.02
query18	0.18	0.19	0.18
query19	1.94	2.11	1.81
query20	0.02	0.01	0.01
query21	15.41	0.97	0.66
query22	0.92	1.02	0.79
query23	14.70	1.60	0.75
query24	5.44	0.57	0.27
query25	0.16	0.09	0.09
query26	0.54	0.21	0.17
query27	0.09	0.09	0.09
query28	11.01	1.16	0.56
query29	12.60	4.10	3.38
query30	0.28	0.09	0.06
query31	2.82	0.62	0.43
query32	3.23	0.59	0.51
query33	2.97	3.09	3.25
query34	16.18	5.15	4.42
query35	4.51	4.47	4.45
query36	0.63	0.50	0.50
query37	0.19	0.17	0.17
query38	0.16	0.16	0.16
query39	0.05	0.04	0.04
query40	0.19	0.16	0.15
query41	0.10	0.05	0.05
query42	0.07	0.05	0.04
query43	0.06	0.05	0.04
Total cold run time: 106.05 s
Total hot run time: 31.73 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/181) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 49.94% (13362/26757)
Line Coverage 39.38% (115586/293533)
Region Coverage 38.08% (58664/154061)
Branch Coverage 33.22% (29607/89130)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants