You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zhaorongsheng (via GitHub)" <gi...@apache.org> on 2026/05/18 09:39:35 UTC

[PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

zhaorongsheng opened a new pull request, #63363:
URL: https://github.com/apache/doris/pull/63363

   Proposed changes
   
     Issue Number: close #63358
   
     DNSCache currently never evicts an entry once it has been inserted. When a backend host is permanently dropped from the cluster and its DNS record is removed, every other BE in the cluster keeps:
   
     1. logging failed to get ip from host: <removed> every 60 s, indefinitely (from DNSCache::_refresh_cache -> hostname_to_ipv4);
     2. handing the stale cached IP back to brpc through BrpcClientCache / ClientCache, which then keeps emitting Fail to wait EPOLLOUT ... Connection timed out at the brpc socket layer.
   
     This PR adds a simple consecutive-failure counter to DNSCache. When the counter reaches a configurable threshold, the entry is removed from the cache so that callers no longer get a stale IP and the refresh thread stops logging about
     it. WARNING logs for the same host are also throttled to avoid flooding be.WARNING.
   
     Configs introduced
   
     Name: dns_cache_max_consecutive_failures
     Type: mInt32
     Default: 30
     Behavior: Evict a hostname after this many consecutive resolution failures. At the default 60 s refresh interval, that means ~30 minutes of grace. Set <= 0 to disable eviction (legacy behavior).
     ────────────────────────────────────────
     Name: dns_cache_log_every_n_failures
     Type: mInt32
     Default: 60
     Behavior: Throttle the Failed to resolve ... use cached ip warning to once per N failures per hostname. Set <= 1 to log every failure (legacy behavior).
   
     Both are mutable so operators can tune without restarting BE.
   
     Backward compatibility
   
     Setting dns_cache_max_consecutive_failures = 0 and dns_cache_log_every_n_failures = 1 reproduces exactly the pre-PR behavior. Successful resolution clears the failure counter, so transient DNS hiccups don't accumulate across hours. No
     public API or wire format changes.
   
     Further comments
   
     - I deliberately did not touch the FE-side DNSCache.java. If the same fix is wanted on FE, happy to send a follow-up PR.
     - The eviction threshold default (30) is conservative; please push back if you'd prefer a smaller / larger default. Operators with very flaky DNS can lower it via the mutable config without redeploying.
   
     ---
     Checklist
   
     - I have read the Contributing document.
     - I have created an issue (#63358) on (or commented on) the related issue.
     - I have added unit tests for my change.
     - All new and existing tests passed (verified locally → fails to build on macOS due to unrelated contrib/openblas issue; rely on CI).
     - My change requires a change to the documentation. — No (config doc auto-generated)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514925171

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31475 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit ba7753619f484a52133396ad47602fad07f196a9, data reload: false
   
   ------ Round 1 ----------------------------------
   orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	17639	3910	3852	3852
   q2	q3	10800	1398	829	829
   q4	4698	481	339	339
   q5	7750	2320	2134	2134
   q6	481	182	141	141
   q7	930	788	643	643
   q8	9614	1984	1630	1630
   q9	6862	4957	4983	4957
   q10	6458	2120	1800	1800
   q11	439	283	253	253
   q12	690	416	288	288
   q13	18270	3418	2816	2816
   q14	262	257	234	234
   q15	q16	888	778	713	713
   q17	968	953	995	953
   q18	6916	5669	5571	5571
   q19	1192	1459	1088	1088
   q20	555	431	270	270
   q21	5943	2788	2642	2642
   q22	466	368	322	322
   Total cold run time: 101821 ms
   Total hot run time: 31475 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	4640	4530	4805	4530
   q2	q3	4843	5157	4676	4676
   q4	2189	2239	1472	1472
   q5	4912	4599	4660	4599
   q6	241	175	133	133
   q7	1940	1715	1564	1564
   q8	2320	1926	1912	1912
   q9	7277	7227	7199	7199
   q10	4481	4400	3988	3988
   q11	530	374	348	348
   q12	715	718	559	559
   q13	3128	3432	2782	2782
   q14	275	287	249	249
   q15	q16	670	707	610	610
   q17	1262	1227	1221	1221
   q18	7489	6765	6791	6765
   q19	1120	1137	1084	1084
   q20	2197	2224	1937	1937
   q21	5354	4634	4462	4462
   q22	514	460	413	413
   Total cold run time: 56097 ms
   Total hot run time: 50503 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514957270

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 169764 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 53beb25ff29c516ea44ab10fd952a4e67c6b3443, data reload: false
   
   query5	4312	658	512	512
   query6	348	212	225	212
   query7	4242	575	310	310
   query8	323	232	226	226
   query9	8818	4041	4024	4024
   query10	451	368	307	307
   query11	5842	2348	2236	2236
   query12	187	131	125	125
   query13	1297	606	448	448
   query14	6009	5337	5043	5043
   query14_1	4362	4395	4346	4346
   query15	212	212	187	187
   query16	981	484	446	446
   query17	968	753	612	612
   query18	2467	498	358	358
   query19	221	211	173	173
   query20	148	139	126	126
   query21	219	146	121	121
   query22	13623	13573	13285	13285
   query23	17216	16318	15999	15999
   query23_1	16092	16133	16201	16133
   query24	7368	1779	1282	1282
   query24_1	1332	1326	1317	1317
   query25	584	507	429	429
   query26	1320	319	180	180
   query27	2713	566	360	360
   query28	4480	1960	1929	1929
   query29	1084	646	532	532
   query30	309	245	200	200
   query31	1164	1062	965	965
   query32	97	78	76	76
   query33	555	368	302	302
   query34	1184	1153	667	667
   query35	789	789	659	659
   query36	1335	1359	1211	1211
   query37	154	103	86	86
   query38	3177	3146	3043	3043
   query39	929	940	893	893
   query39_1	870	872	873	872
   query40	224	146	124	124
   query41	64	63	63	63
   query42	108	108	108	108
   query43	323	325	281	281
   query44	
   query45	210	200	191	191
   query46	1058	1214	713	713
   query47	2242	2422	2226	2226
   query48	399	409	292	292
   query49	649	504	376	376
   query50	1011	344	254	254
   query51	4322	4244	4250	4244
   query52	104	105	95	95
   query53	247	275	210	210
   query54	302	263	263	263
   query55	94	98	86	86
   query56	287	298	307	298
   query57	1419	1399	1336	1336
   query58	298	265	264	264
   query59	1540	1591	1368	1368
   query60	315	333	308	308
   query61	162	161	161	161
   query62	665	631	569	569
   query63	241	203	210	203
   query64	2415	774	633	633
   query65	
   query66	1716	480	365	365
   query67	29974	29902	29790	29790
   query68	
   query69	467	333	306	306
   query70	943	975	990	975
   query71	308	272	267	267
   query72	3009	2780	2447	2447
   query73	811	794	416	416
   query74	5046	4888	4751	4751
   query75	2651	2615	2243	2243
   query76	2295	1144	800	800
   query77	409	424	329	329
   query78	12199	12110	11580	11580
   query79	1599	1018	749	749
   query80	666	544	465	465
   query81	450	283	244	244
   query82	1382	157	126	126
   query83	361	280	245	245
   query84	313	148	112	112
   query85	885	539	457	457
   query86	404	370	302	302
   query87	3401	3398	3217	3217
   query88	3547	2665	2640	2640
   query89	444	377	337	337
   query90	1979	183	179	179
   query91	178	170	147	147
   query92	83	76	71	71
   query93	1523	1457	958	958
   query94	555	359	341	341
   query95	672	468	351	351
   query96	1007	794	326	326
   query97	2688	2670	2549	2549
   query98	233	233	234	233
   query99	1135	1111	1005	1005
   Total cold run time: 253059 ms
   Total hot run time: 169764 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5090120460

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 178099 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit e10d7e9ffe771271681707216dfffb5bdb658f7a, data reload: false
   
   query5	4310	642	482	482
   query6	471	232	214	214
   query7	4867	606	325	325
   query8	338	191	171	171
   query9	8756	4188	4142	4142
   query10	484	354	301	301
   query11	5899	2366	2149	2149
   query12	166	104	103	103
   query13	1251	604	441	441
   query14	6354	5255	4882	4882
   query14_1	4371	4236	4271	4236
   query15	211	206	182	182
   query16	1056	482	524	482
   query17	1131	736	565	565
   query18	2675	468	348	348
   query19	204	190	141	141
   query20	113	105	108	105
   query21	233	159	136	136
   query22	13523	13613	13355	13355
   query23	17416	16563	16094	16094
   query23_1	16252	16228	16234	16228
   query24	7482	1736	1277	1277
   query24_1	1313	1317	1276	1276
   query25	561	432	363	363
   query26	1327	363	209	209
   query27	2601	601	402	402
   query28	4462	2055	1986	1986
   query29	1066	608	474	474
   query30	352	270	230	230
   query31	1113	1087	984	984
   query32	106	60	57	57
   query33	523	320	251	251
   query34	1195	1186	613	613
   query35	762	775	673	673
   query36	1197	1211	1056	1056
   query37	153	103	93	93
   query38	1875	1693	1654	1654
   query39	898	871	851	851
   query39_1	835	828	850	828
   query40	243	163	145	145
   query41	64	63	68	63
   query42	98	93	94	93
   query43	335	329	283	283
   query44	1518	770	788	770
   query45	204	190	175	175
   query46	1067	1242	727	727
   query47	2086	2259	2008	2008
   query48	436	434	291	291
   query49	601	424	306	306
   query50	1127	440	352	352
   query51	10573	10532	10538	10532
   query52	89	92	77	77
   query53	266	287	213	213
   query54	295	258	234	234
   query55	80	76	68	68
   query56	337	326	318	318
   query57	1304	1308	1188	1188
   query58	299	285	277	277
   query59	1633	1660	1481	1481
   query60	322	298	262	262
   query61	181	171	171	171
   query62	548	506	427	427
   query63	249	214	208	208
   query64	2904	1166	838	838
   query65	4780	4635	4650	4635
   query66	1764	504	383	383
   query67	29421	29529	29101	29101
   query68	3182	1556	959	959
   query69	413	298	275	275
   query70	1053	927	957	927
   query71	380	352	324	324
   query72	3036	2668	2455	2455
   query73	869	824	424	424
   query74	5100	4971	4753	4753
   query75	2522	2508	2125	2125
   query76	2301	1185	820	820
   query77	374	372	294	294
   query78	11784	11900	11240	11240
   query79	1386	1168	712	712
   query80	1271	554	466	466
   query81	521	336	293	293
   query82	617	156	125	125
   query83	366	320	297	297
   query84	272	158	130	130
   query85	970	610	518	518
   query86	420	301	268	268
   query87	1826	1823	1775	1775
   query88	3811	2825	2817	2817
   query89	441	379	329	329
   query90	1922	204	198	198
   query91	202	192	165	165
   query92	66	59	56	56
   query93	1616	1571	1028	1028
   query94	710	341	328	328
   query95	782	496	569	496
   query96	1009	792	357	357
   query97	2618	2608	2484	2484
   query98	215	205	199	199
   query99	1081	1113	970	970
   Total cold run time: 264230 ms
   Total hot run time: 178099 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5138910446

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29418 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 16c1a3c6894cab55530c54fbfe0472d17e7aa960, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17654	4061	4001	4001
   q2	2115	356	203	203
   q3	10190	1414	839	839
   q4	4683	477	349	349
   q5	7501	846	584	584
   q6	186	169	137	137
   q7	784	817	620	620
   q8	9321	1502	1512	1502
   q9	5554	4340	4301	4301
   q10	6761	1728	1477	1477
   q11	502	347	316	316
   q12	724	577	452	452
   q13	18066	3352	2803	2803
   q14	265	259	237	237
   q15	q16	786	784	719	719
   q17	1041	1039	1057	1039
   q18	6836	5724	5510	5510
   q19	1315	1361	975	975
   q20	814	672	613	613
   q21	6132	2595	2445	2445
   q22	438	360	296	296
   Total cold run time: 101668 ms
   Total hot run time: 29418 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4441	4317	4340	4317
   q2	299	321	216	216
   q3	4555	4999	4396	4396
   q4	2063	2177	1335	1335
   q5	4363	4275	4292	4275
   q6	227	177	128	128
   q7	1689	1833	1874	1833
   q8	2600	2206	2223	2206
   q9	8006	8133	7688	7688
   q10	4697	4664	4178	4178
   q11	575	424	401	401
   q12	800	772	547	547
   q13	3248	3647	2895	2895
   q14	294	309	266	266
   q15	q16	705	746	654	654
   q17	1361	1324	1310	1310
   q18	8070	7484	7313	7313
   q19	1163	1139	1146	1139
   q20	2224	2197	1935	1935
   q21	5235	4505	4434	4434
   q22	529	453	406	406
   Total cold run time: 57144 ms
   Total hot run time: 51872 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4496090616

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5114324238

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 24.95 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 2f6e6deea902b0ee0201c1cebf6ae52e82167fee, data reload: false
   
   query1	0.01	0.01	0.01
   query2	0.10	0.04	0.05
   query3	0.26	0.18	0.13
   query4	1.61	0.14	0.14
   query5	0.24	0.23	0.22
   query6	1.25	1.08	1.07
   query7	0.03	0.01	0.00
   query8	0.07	0.04	0.03
   query9	0.40	0.31	0.31
   query10	0.56	0.54	0.55
   query11	0.19	0.14	0.13
   query12	0.19	0.14	0.14
   query13	0.47	0.47	0.48
   query14	1.02	1.03	1.01
   query15	0.61	0.60	0.59
   query16	0.32	0.33	0.32
   query17	1.12	1.06	1.09
   query18	0.24	0.21	0.21
   query19	2.06	1.99	1.92
   query20	0.02	0.01	0.01
   query21	15.43	0.24	0.13
   query22	4.84	0.05	0.05
   query23	16.12	0.30	0.11
   query24	2.99	0.46	0.31
   query25	0.12	0.05	0.04
   query26	0.71	0.21	0.16
   query27	0.04	0.04	0.03
   query28	3.55	0.89	0.55
   query29	12.47	4.09	3.30
   query30	0.27	0.15	0.15
   query31	2.77	0.62	0.31
   query32	3.22	0.60	0.49
   query33	3.31	3.17	3.22
   query34	15.56	4.26	3.48
   query35	3.57	3.52	3.53
   query36	0.55	0.44	0.44
   query37	0.09	0.06	0.07
   query38	0.05	0.04	0.04
   query39	0.04	0.03	0.03
   query40	0.19	0.16	0.14
   query41	0.08	0.03	0.03
   query42	0.03	0.03	0.03
   query43	0.04	0.04	0.03
   Total cold run time: 96.81 s
   Total hot run time: 24.95 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5151736111

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 23.89 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 19530d60fd6bca8cb12ea01cc278bc2b3309bfca, data reload: false
   
   query1	0.01	0.00	0.01
   query2	0.09	0.05	0.05
   query3	0.26	0.12	0.12
   query4	1.61	0.14	0.14
   query5	0.25	0.25	0.23
   query6	1.16	0.85	0.83
   query7	0.04	0.01	0.00
   query8	0.06	0.03	0.03
   query9	0.37	0.33	0.31
   query10	0.54	0.57	0.57
   query11	0.21	0.13	0.13
   query12	0.18	0.15	0.13
   query13	0.47	0.47	0.47
   query14	1.02	1.00	1.01
   query15	0.63	0.62	0.58
   query16	0.31	0.34	0.33
   query17	1.16	1.09	1.12
   query18	0.21	0.20	0.19
   query19	2.06	1.99	1.92
   query20	0.02	0.02	0.01
   query21	15.43	0.23	0.14
   query22	4.81	0.06	0.06
   query23	16.13	0.30	0.12
   query24	2.99	0.42	0.33
   query25	0.10	0.05	0.04
   query26	0.73	0.20	0.14
   query27	0.03	0.04	0.03
   query28	3.53	0.83	0.35
   query29	12.47	4.00	3.17
   query30	0.28	0.15	0.14
   query31	2.77	0.54	0.32
   query32	3.22	0.59	0.49
   query33	3.20	3.16	3.18
   query34	15.69	3.98	3.28
   query35	3.20	3.23	3.23
   query36	0.54	0.45	0.42
   query37	0.13	0.06	0.06
   query38	0.04	0.04	0.03
   query39	0.03	0.03	0.03
   query40	0.17	0.14	0.13
   query41	0.08	0.03	0.03
   query42	0.03	0.03	0.03
   query43	0.04	0.03	0.04
   Total cold run time: 96.3 s
   Total hot run time: 23.89 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5085973512

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5138969192

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 177660 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 16c1a3c6894cab55530c54fbfe0472d17e7aa960, data reload: false
   
   query5	4311	632	492	492
   query6	467	227	209	209
   query7	4950	610	338	338
   query8	330	191	167	167
   query9	8795	4162	4130	4130
   query10	515	364	294	294
   query11	5861	2325	2115	2115
   query12	161	103	103	103
   query13	1256	621	407	407
   query14	6262	5199	4837	4837
   query14_1	4238	4200	4220	4200
   query15	219	202	175	175
   query16	1001	464	426	426
   query17	918	706	569	569
   query18	2433	473	339	339
   query19	205	185	143	143
   query20	109	107	107	107
   query21	227	155	135	135
   query22	13600	13512	13458	13458
   query23	17340	16459	16015	16015
   query23_1	16126	16304	16134	16134
   query24	7464	1756	1287	1287
   query24_1	1298	1312	1309	1309
   query25	584	484	389	389
   query26	1349	391	221	221
   query27	2588	601	373	373
   query28	4525	2001	2046	2001
   query29	1086	622	500	500
   query30	343	262	228	228
   query31	1115	1094	984	984
   query32	111	66	64	64
   query33	526	331	267	267
   query34	1184	1150	681	681
   query35	783	787	681	681
   query36	1013	1028	890	890
   query37	159	107	102	102
   query38	1883	1694	1650	1650
   query39	882	870	844	844
   query39_1	836	835	848	835
   query40	256	171	153	153
   query41	78	76	71	71
   query42	96	95	96	95
   query43	334	326	286	286
   query44	1464	803	784	784
   query45	196	187	177	177
   query46	1100	1236	769	769
   query47	2065	2061	2034	2034
   query48	432	447	320	320
   query49	585	432	316	316
   query50	1081	422	343	343
   query51	10596	10504	10407	10407
   query52	90	90	86	86
   query53	270	293	214	214
   query54	308	249	274	249
   query55	79	74	67	67
   query56	316	315	295	295
   query57	1301	1268	1177	1177
   query58	293	328	270	270
   query59	1592	1683	1457	1457
   query60	313	281	269	269
   query61	181	179	180	179
   query62	551	497	432	432
   query63	249	210	201	201
   query64	2948	1046	874	874
   query65	4721	4648	4594	4594
   query66	1825	493	382	382
   query67	29272	29243	29074	29074
   query68	3086	1542	1062	1062
   query69	424	303	283	283
   query70	930	849	850	849
   query71	371	328	321	321
   query72	3086	2728	2495	2495
   query73	840	819	432	432
   query74	5092	4883	4736	4736
   query75	2552	2519	2123	2123
   query76	2308	1203	792	792
   query77	353	380	287	287
   query78	11876	11955	11447	11447
   query79	1368	1213	756	756
   query80	668	545	478	478
   query81	465	329	288	288
   query82	563	155	117	117
   query83	406	335	302	302
   query84	323	165	134	134
   query85	974	624	539	539
   query86	321	251	245	245
   query87	1818	1831	1741	1741
   query88	3809	2876	2859	2859
   query89	433	386	334	334
   query90	1960	214	208	208
   query91	200	189	166	166
   query92	61	62	56	56
   query93	1703	1508	986	986
   query94	518	346	327	327
   query95	798	514	583	514
   query96	1077	809	350	350
   query97	2660	2606	2490	2490
   query98	218	206	205	205
   query99	1088	1104	980	980
   Total cold run time: 262423 ms
   Total hot run time: 177660 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5138993637

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 24.82 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 16c1a3c6894cab55530c54fbfe0472d17e7aa960, data reload: false
   
   query1	0.01	0.01	0.00
   query2	0.10	0.05	0.05
   query3	0.25	0.14	0.13
   query4	1.61	0.14	0.14
   query5	0.24	0.22	0.23
   query6	1.16	0.81	0.85
   query7	0.04	0.00	0.00
   query8	0.06	0.04	0.04
   query9	0.38	0.32	0.31
   query10	0.55	0.54	0.55
   query11	0.19	0.13	0.14
   query12	0.18	0.13	0.15
   query13	0.46	0.46	0.48
   query14	1.04	1.03	0.99
   query15	0.61	0.60	0.59
   query16	0.33	0.33	0.32
   query17	1.16	1.10	1.10
   query18	0.24	0.22	0.22
   query19	2.02	1.99	1.96
   query20	0.02	0.01	0.01
   query21	15.41	0.21	0.15
   query22	4.96	0.05	0.06
   query23	16.08	0.30	0.12
   query24	2.96	0.42	0.31
   query25	0.13	0.05	0.04
   query26	0.72	0.20	0.14
   query27	0.04	0.07	0.04
   query28	3.49	0.90	0.52
   query29	12.47	4.02	3.27
   query30	0.27	0.15	0.18
   query31	2.76	0.60	0.32
   query32	3.22	0.59	0.48
   query33	3.12	3.20	3.20
   query34	15.64	4.26	3.55
   query35	3.56	3.53	3.56
   query36	0.55	0.43	0.43
   query37	0.10	0.06	0.07
   query38	0.05	0.04	0.04
   query39	0.03	0.03	0.03
   query40	0.19	0.16	0.15
   query41	0.09	0.03	0.02
   query42	0.04	0.03	0.03
   query43	0.04	0.04	0.04
   Total cold run time: 96.57 s
   Total hot run time: 24.82 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5114914474

   # BE Regression && UT Coverage Report
   Increment line coverage `98.47% (129/131)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_2f6e6deea902b0ee0201c1cebf6ae52e82167fee_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_2f6e6deea902b0ee0201c1cebf6ae52e82167fee_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 75.67% (31844/42085) |
   | Line Coverage     | 60.32% (354944/588463) |
   | Region Coverage   | 56.99% (298046/523009) |
   | Branch Coverage   | 58.34% (133771/229298) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5138720021

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4628800693

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5088727913

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5139694273

   # BE Regression && UT Coverage Report
   Increment line coverage `95.74% (135/141)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_16c1a3c6894cab55530c54fbfe0472d17e7aa960_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_16c1a3c6894cab55530c54fbfe0472d17e7aa960_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 75.74% (31988/42235) |
   | Line Coverage     | 60.37% (356493/590467) |
   | Region Coverage   | 56.89% (298664/524955) |
   | Branch Coverage   | 58.29% (134484/230708) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4899391126

   @morrySnow  @morningman would you mind reviewing it again? thx


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5112200631

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #63363:
URL: https://github.com/apache/doris/pull/63363#discussion_r3670698673


##########
be/src/util/dns_cache.cpp:
##########
@@ -26,35 +31,68 @@ DNSCache::DNSCache() {
     refresh_thread = std::thread(&DNSCache::_refresh_cache, this);
 }
 
+DNSCache::DNSCache(Resolver resolver) : _resolver(std::move(resolver)) {}
+
 DNSCache::~DNSCache() {
-    stop_refresh = true;
+    {
+        std::lock_guard<std::mutex> lk(_cv_mutex);
+        stop_refresh = true;
+    }
+    _cv.notify_all();
     if (refresh_thread.joinable()) {
         refresh_thread.join();
     }
 }
 
 Status DNSCache::get(const std::string& hostname, std::string* ip) {
+    bool expired_negative = false;
     {
         std::shared_lock<std::shared_mutex> lock(mutex);
         auto it = cache.find(hostname);
         if (it != cache.end()) {
             *ip = it->second;
             return Status::OK();
         }
+        // Return a cheap error for recently-evicted hosts to avoid repeated
+        // blocking getaddrinfo calls during the transition after a backend is
+        // dropped.  The entry expires after dns_cache_negative_ttl_seconds;
+        // once expired the next caller falls through and retries the resolve.
+        auto neg_it = _negative_cache.find(hostname);
+        if (neg_it != _negative_cache.end()) {
+            if (std::chrono::steady_clock::now() < neg_it->second) {

Review Comment:
   This ignores the live mutable setting once a tombstone exists. For example, evict with `dns_cache_negative_ttl_seconds=3600`, then set it to `0` after DNS recovers: this stored deadline still makes every `get()` fail for nearly the original hour, although the config contract says `<= 0` disables the negative cache. A decrease has the same stale-deadline problem. Please derive effective expiry from the current TTL (for example by storing eviction time), or clear/shorten existing tombstones on update, and test positive-to-zero plus large-to-small transitions.



##########
be/src/util/dns_cache.cpp:
##########
@@ -67,55 +105,190 @@ std::string DNSCache::_resolve_hostname(const std::string& hostname) {
 
     // Try to resolve hostname
     std::string resolved_ip;
-    Status status = hostname_to_ip(hostname, resolved_ip, BackendOptions::is_bind_ipv6());
+    Status status = _resolver
+                            ? _resolver(hostname, resolved_ip, BackendOptions::is_bind_ipv6())
+                            : hostname_to_ip(hostname, resolved_ip, BackendOptions::is_bind_ipv6());
 
     if (!status.ok() || resolved_ip.empty()) {
-        // Resolution failed
+        if (is_fresh) *is_fresh = false;
         if (!cached_ip.empty()) {
-            LOG(WARNING) << "Failed to resolve hostname " << hostname
-                         << ", use cached ip: " << cached_ip;
+            // Only track failure counts for hosts that are currently in the cache.
+            // Hosts that were never cached or have already been evicted are not
+            // tracked, which prevents unbounded growth of failure_count.
+            uint32_t failures = 0;
+            {
+                std::unique_lock<std::shared_mutex> lock(mutex);
+                // Re-check that the host is still cached under the unique_lock:
+                // it may have been evicted by the refresh thread between our
+                // earlier shared_lock read of cached_ip and now (hostname_to_ip
+                // can block for seconds on DNS timeout, widening the window).
+                // Skipping the bump here preserves keys(failure_count) ⊆ keys(cache).
+                if (cache.find(hostname) != cache.end()) {
+                    failures = ++failure_count[hostname];
+                }
+            }
+            // Throttle the log: only every N failures or the first failure.
+            if (failures > 0) {
+                int32_t every_n = std::max(1, config::dns_cache_log_every_n_failures);
+                if (failures == 1 || failures % static_cast<uint32_t>(every_n) == 0) {
+                    LOG(WARNING) << "Failed to resolve hostname " << hostname
+                                 << " (consecutive failures: " << failures
+                                 << "), use cached ip: " << cached_ip;
+                }
+            }
             return cached_ip;
         } else {
-            LOG(WARNING) << "Failed to resolve hostname " << hostname << ", no cached ip available";
+            // Throttle to avoid flooding be.WARNING when callers repeatedly
+            // query an evicted or never-resolvable hostname.  This branch
+            // deliberately does not maintain a per-hostname counter (that
+            // would break the keys(failure_count) ⊆ keys(cache) invariant),
+            // so the throttle is a coarse global rate limit shared across
+            // all hostnames hitting this code path.
+            static std::atomic<uint64_t> no_cache_warn_counter {0};
+            uint64_t n = no_cache_warn_counter.fetch_add(1, std::memory_order_relaxed) + 1;
+            int32_t every_n = std::max(1, config::dns_cache_log_every_n_failures);
+            if (n == 1 || n % static_cast<uint64_t>(every_n) == 0) {
+                LOG(WARNING) << "Failed to resolve hostname " << hostname
+                             << ", no cached ip available";
+            }
             return "";
         }
     }
 
+    // Resolution succeeded - clear failure counter for this hostname.
+    if (is_fresh) *is_fresh = true;
+    {
+        std::unique_lock<std::shared_mutex> lock(mutex);
+        failure_count.erase(hostname);
+    }
     return resolved_ip;
 }
 
-Status DNSCache::_update(const std::string& hostname) {
-    std::string real_ip = _resolve_hostname(hostname);
+void DNSCache::_erase(const std::string& hostname) {
+    std::unique_lock<std::shared_mutex> lock(mutex);
+    cache.erase(hostname);
+    failure_count.erase(hostname);
+    int32_t ttl = config::dns_cache_negative_ttl_seconds;
+    if (ttl > 0) {
+        _negative_cache[hostname] =
+                std::chrono::steady_clock::now() + std::chrono::seconds(ttl);
+    }
+}
+
+bool DNSCache::_erase_if_still_failing(const std::string& hostname, uint32_t threshold) {
+    std::unique_lock<std::shared_mutex> lock(mutex);
+    auto fc_it = failure_count.find(hostname);
+    if (fc_it == failure_count.end() || fc_it->second < threshold) {
+        // A concurrent successful resolution cleared or reset the counter between
+        // _update() returning and this call — do not erase a now-healthy entry.
+        return false;
+    }
+    cache.erase(hostname);
+    failure_count.erase(hostname);
+    int32_t ttl = config::dns_cache_negative_ttl_seconds;
+    if (ttl > 0) {
+        _negative_cache[hostname] =
+                std::chrono::steady_clock::now() + std::chrono::seconds(ttl);
+    }
+    return true;
+}
+
+Status DNSCache::_update(const std::string& hostname, uint32_t* out_failures, std::string* out_ip) {
+    bool is_fresh = false;
+    std::string real_ip = _resolve_hostname(hostname, &is_fresh);
     if (real_ip.empty()) {
+        if (out_failures) *out_failures = 0;
+        if (out_ip) out_ip->clear();
         return Status::InternalError("Failed to resolve hostname {} and no cached ip available",
                                      hostname);
     }
 
     std::unique_lock<std::shared_mutex> lock(mutex);
+    // _resolve_hostname may have captured a stale cached_ip before a concurrent
+    // eviction completed.  If the host is now in the negative cache we must not
+    // reinsert the stale IP: that would silently undo the eviction and clear the
+    // tombstone, defeating the whole purpose of eviction.  Only a fresh DNS
+    // result (is_fresh == true, meaning DNS actually resolved) may override an
+    // eviction — which indicates the backend is genuinely back.
+    if (!is_fresh && _negative_cache.count(hostname)) {
+        if (out_failures) *out_failures = 0;
+        if (out_ip) out_ip->clear();
+        return Status::InternalError(
+                "Hostname {} was concurrently evicted; stale-fallback not reinserted", hostname);
+    }
     auto it = cache.find(hostname);
     if (it == cache.end() || it->second != real_ip) {
         cache[hostname] = real_ip;
         LOG(INFO) << "update hostname " << hostname << "'s ip to " << real_ip;
     }
+    // DNS resolved successfully — remove any negative cache tombstone so
+    // subsequent get() calls go straight to the main cache.
+    _negative_cache.erase(hostname);
+    if (out_ip) *out_ip = real_ip;
+    // Read failure_count under the same lock we already hold, so _refresh_once
+    // does not need a second lock acquisition to decide on eviction.
+    if (out_failures) {
+        auto fc_it = failure_count.find(hostname);
+        *out_failures = fc_it != failure_count.end() ? fc_it->second : 0;
+    }
     return Status::OK();
 }
 
+void DNSCache::_refresh_once() {
+    // Purge expired negative-cache entries to prevent unbounded map growth.
+    {
+        std::unique_lock<std::shared_mutex> lock(mutex);
+        auto now = std::chrono::steady_clock::now();
+        for (auto it = _negative_cache.begin(); it != _negative_cache.end();) {
+            it = (now >= it->second) ? _negative_cache.erase(it) : std::next(it);

Review Comment:
   This cleanup removes the only marker that lets `get()` recognize a failed retry and re-arm the backoff. With the defaults, eviction creates a 60-second tombstone; the next refresh starts after another 60-second wait, erases it here, and does not retry it because the hostname is no longer in `cache`. If DNS is still down, the next request sees no tombstone, leaves `expired_negative=false`, and skips the re-arm block—so every later serial request again performs synchronous DNS indefinitely. Please preserve/transition the per-host state until one caller claims the retry, and add an expire → refresh cleanup → repeated failed `get()` test.



##########
be/src/util/dns_cache.cpp:
##########
@@ -26,35 +31,68 @@ DNSCache::DNSCache() {
     refresh_thread = std::thread(&DNSCache::_refresh_cache, this);
 }
 
+DNSCache::DNSCache(Resolver resolver) : _resolver(std::move(resolver)) {}
+
 DNSCache::~DNSCache() {
-    stop_refresh = true;
+    {
+        std::lock_guard<std::mutex> lk(_cv_mutex);
+        stop_refresh = true;
+    }
+    _cv.notify_all();
     if (refresh_thread.joinable()) {
         refresh_thread.join();
     }
 }
 
 Status DNSCache::get(const std::string& hostname, std::string* ip) {
+    bool expired_negative = false;
     {
         std::shared_lock<std::shared_mutex> lock(mutex);
         auto it = cache.find(hostname);
         if (it != cache.end()) {
             *ip = it->second;
             return Status::OK();
         }
+        // Return a cheap error for recently-evicted hosts to avoid repeated
+        // blocking getaddrinfo calls during the transition after a backend is
+        // dropped.  The entry expires after dns_cache_negative_ttl_seconds;
+        // once expired the next caller falls through and retries the resolve.
+        auto neg_it = _negative_cache.find(hostname);
+        if (neg_it != _negative_cache.end()) {
+            if (std::chrono::steady_clock::now() < neg_it->second) {
+                return Status::InternalError(
+                        "Hostname {} is in negative DNS cache (recently evicted), skipping resolve",
+                        hostname);
+            }
+            expired_negative = true; // TTL passed; allow one retry

Review Comment:
   The expired entry is not claimed by any caller: every request can hold this shared lock, observe the same deadline, set its own `expired_negative`, and reach `_update()` before the first failure re-arms the map. In a retry burst, that makes all N request threads block in `getaddrinfo` and emit resolver errors at the TTL boundary, even though the new path claims one attempt per host per TTL. This is distinct from the earlier no-backoff thread: it is a race in the newly added expiry handoff. Please atomically mark one per-host retry as in flight (without holding the lock during DNS), keep other callers on the cheap-error path, and add a barrier-controlled test that proves one resolver call for simultaneous expired-cache requests.



##########
be/src/util/dns_cache.cpp:
##########
@@ -67,55 +105,190 @@ std::string DNSCache::_resolve_hostname(const std::string& hostname) {
 
     // Try to resolve hostname
     std::string resolved_ip;
-    Status status = hostname_to_ip(hostname, resolved_ip, BackendOptions::is_bind_ipv6());
+    Status status = _resolver
+                            ? _resolver(hostname, resolved_ip, BackendOptions::is_bind_ipv6())
+                            : hostname_to_ip(hostname, resolved_ip, BackendOptions::is_bind_ipv6());
 
     if (!status.ok() || resolved_ip.empty()) {
-        // Resolution failed
+        if (is_fresh) *is_fresh = false;
         if (!cached_ip.empty()) {
-            LOG(WARNING) << "Failed to resolve hostname " << hostname
-                         << ", use cached ip: " << cached_ip;
+            // Only track failure counts for hosts that are currently in the cache.
+            // Hosts that were never cached or have already been evicted are not
+            // tracked, which prevents unbounded growth of failure_count.
+            uint32_t failures = 0;
+            {
+                std::unique_lock<std::shared_mutex> lock(mutex);
+                // Re-check that the host is still cached under the unique_lock:
+                // it may have been evicted by the refresh thread between our
+                // earlier shared_lock read of cached_ip and now (hostname_to_ip
+                // can block for seconds on DNS timeout, widening the window).
+                // Skipping the bump here preserves keys(failure_count) ⊆ keys(cache).
+                if (cache.find(hostname) != cache.end()) {
+                    failures = ++failure_count[hostname];
+                }
+            }
+            // Throttle the log: only every N failures or the first failure.
+            if (failures > 0) {
+                int32_t every_n = std::max(1, config::dns_cache_log_every_n_failures);
+                if (failures == 1 || failures % static_cast<uint32_t>(every_n) == 0) {
+                    LOG(WARNING) << "Failed to resolve hostname " << hostname
+                                 << " (consecutive failures: " << failures
+                                 << "), use cached ip: " << cached_ip;
+                }
+            }
             return cached_ip;
         } else {
-            LOG(WARNING) << "Failed to resolve hostname " << hostname << ", no cached ip available";
+            // Throttle to avoid flooding be.WARNING when callers repeatedly
+            // query an evicted or never-resolvable hostname.  This branch
+            // deliberately does not maintain a per-hostname counter (that
+            // would break the keys(failure_count) ⊆ keys(cache) invariant),
+            // so the throttle is a coarse global rate limit shared across
+            // all hostnames hitting this code path.
+            static std::atomic<uint64_t> no_cache_warn_counter {0};
+            uint64_t n = no_cache_warn_counter.fetch_add(1, std::memory_order_relaxed) + 1;
+            int32_t every_n = std::max(1, config::dns_cache_log_every_n_failures);
+            if (n == 1 || n % static_cast<uint64_t>(every_n) == 0) {
+                LOG(WARNING) << "Failed to resolve hostname " << hostname
+                             << ", no cached ip available";
+            }
             return "";
         }
     }
 
+    // Resolution succeeded - clear failure counter for this hostname.
+    if (is_fresh) *is_fresh = true;
+    {
+        std::unique_lock<std::shared_mutex> lock(mutex);
+        failure_count.erase(hostname);
+    }
     return resolved_ip;
 }
 
-Status DNSCache::_update(const std::string& hostname) {
-    std::string real_ip = _resolve_hostname(hostname);
+void DNSCache::_erase(const std::string& hostname) {
+    std::unique_lock<std::shared_mutex> lock(mutex);
+    cache.erase(hostname);
+    failure_count.erase(hostname);
+    int32_t ttl = config::dns_cache_negative_ttl_seconds;
+    if (ttl > 0) {
+        _negative_cache[hostname] =
+                std::chrono::steady_clock::now() + std::chrono::seconds(ttl);
+    }
+}
+
+bool DNSCache::_erase_if_still_failing(const std::string& hostname, uint32_t threshold) {
+    std::unique_lock<std::shared_mutex> lock(mutex);
+    auto fc_it = failure_count.find(hostname);
+    if (fc_it == failure_count.end() || fc_it->second < threshold) {
+        // A concurrent successful resolution cleared or reset the counter between
+        // _update() returning and this call — do not erase a now-healthy entry.
+        return false;
+    }
+    cache.erase(hostname);

Review Comment:
   Eviction makes a DNS error a normal outcome for a hostname that previously returned its cached IP, so downstream error handling now matters. In `CloudWarmUpManager::_recycle_cache()` (`cloud_warm_up_manager.cpp:961-985`), the first such replica takes `return` at line 971 and skips every later replica; the sibling rowset warm-up loop correctly records the failure and `continue`s. The `CloudTablet` callers do not retry this best-effort recycle request, so healthy later replicas keep obsolete cache entries. Please make this caller continue per replica (and audit the other new error consumers), with a multi-replica test where a negative-cached host precedes a reachable peer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5112406186

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5118484795

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 25.06 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit fa74d5033267476a1c0007f123026b3bda4d2e14, data reload: false
   
   query1	0.00	0.00	0.00
   query2	0.09	0.04	0.05
   query3	0.25	0.13	0.13
   query4	1.60	0.14	0.13
   query5	0.24	0.22	0.23
   query6	1.25	1.12	1.08
   query7	0.04	0.01	0.01
   query8	0.05	0.04	0.03
   query9	0.37	0.31	0.32
   query10	0.57	0.55	0.54
   query11	0.19	0.14	0.13
   query12	0.18	0.14	0.14
   query13	0.47	0.47	0.48
   query14	1.01	1.00	1.03
   query15	0.62	0.59	0.59
   query16	0.31	0.33	0.32
   query17	1.09	1.10	1.10
   query18	0.23	0.22	0.22
   query19	2.01	1.93	1.93
   query20	0.02	0.02	0.01
   query21	15.43	0.19	0.13
   query22	4.96	0.06	0.05
   query23	16.17	0.30	0.14
   query24	3.02	0.43	0.31
   query25	0.11	0.05	0.03
   query26	0.75	0.22	0.14
   query27	0.05	0.03	0.03
   query28	3.50	0.91	0.52
   query29	12.50	4.13	3.29
   query30	0.28	0.15	0.16
   query31	2.80	0.60	0.31
   query32	3.22	0.59	0.49
   query33	3.15	3.19	3.20
   query34	15.48	4.23	3.52
   query35	3.55	3.54	3.55
   query36	0.56	0.44	0.43
   query37	0.09	0.07	0.06
   query38	0.05	0.04	0.04
   query39	0.04	0.03	0.03
   query40	0.18	0.16	0.16
   query41	0.08	0.04	0.03
   query42	0.04	0.03	0.03
   query43	0.04	0.04	0.04
   Total cold run time: 96.64 s
   Total hot run time: 25.06 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4476374824

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/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?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5084049517

   ## 1. Fix the condition-variable lost-wakeup in the destructor (Medium)
   
   In `be/src/util/dns_cache.cpp`, the destructor sets `stop_refresh` and calls `_cv.notify_all()`
   **without holding `_cv_mutex`**:
   
   ```cpp
   DNSCache::~DNSCache() {
       stop_refresh = true;      // not under _cv_mutex
       _cv.notify_all();
       ...
   }
   ```
   
   The refresh thread waits with `_cv.wait_for(lk, 1min, [this]{ return stop_refresh.load(); })`. Even
   though `stop_refresh` is atomic, `std::condition_variable` requires the predicate to be mutated while
   holding the wait mutex; otherwise the notification can be lost if it lands in the window after the
   thread evaluates the predicate as `false` but before it actually blocks. When that happens the thread
   sleeps until the 1-minute timeout, so `~DNSCache()` stalls on `join()` for up to ~60 s at BE
   shutdown — defeating the whole reason for switching from `sleep_for` to a condition variable.
   
   **Fix** — set the flag under the lock, then notify:
   
   ```cpp
   DNSCache::~DNSCache() {
       {
           std::lock_guard<std::mutex> lk(_cv_mutex);
           stop_refresh = true;
       }
       _cv.notify_all();
       if (refresh_thread.joinable()) {
           refresh_thread.join();
       }
   }
   ```
   
   ## 2. Add a short negative-result cache to avoid blocking re-resolves after eviction (Medium)
   
   Before this PR, a host that had ever resolved stayed in the cache, so `get()` was a fast read-lock
   hit returning the (stale) IP instantly. After eviction the host is gone from the cache, so **every**
   subsequent `get()` falls through to `_update()` → `_resolve_hostname()` → `hostname_to_ip()`, which
   is a **blocking `getaddrinfo`** that can stall for seconds on a DNS timeout. There is no negative
   cache and no single-flight, so multiple caller threads asking for the same dead host each block on
   their own lookup. All callers hit this on the request path (`brpc_client_cache.h`, `client_cache.cpp`,
   `proto_util.h`, `peer_file_cache_reader.cpp`, `vtablet_writer.cpp`, and the cloud paths).
   
   In practice the impact is bounded — once a backend is dropped and the FE stops routing to it, callers
   stop asking — but during the transition this converts "fast stale-IP returns" into "repeated
   multi-second blocking resolves." Consider a small negative-result cache (remember "unresolvable until
   now + backoff", or keep a tombstone entry with a short retry interval) so an evicted-but-still-requested
   host returns an error cheaply instead of re-incurring a full DNS timeout on every call.
   
   
   ## 3. Reconcile the two configuration defaults (Low)
   
   With the shipped defaults `dns_cache_log_every_n_failures = 60` and
   `dns_cache_max_consecutive_failures = 30`, a cached host is evicted at failure 30 — before the
   `failures % 60 == 0` periodic log can ever fire. So on the cached-IP path only the first-failure log
   is emitted (then the eviction log), and `dns_cache_log_every_n_failures` effectively has no influence
   under defaults, which is surprising. Either document this interaction or default
   `dns_cache_log_every_n_failures <= dns_cache_max_consecutive_failures` so at least one periodic
   progress log appears before eviction.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5114282402

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 177874 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 2f6e6deea902b0ee0201c1cebf6ae52e82167fee, data reload: false
   
   query5	4336	650	475	475
   query6	483	218	220	218
   query7	4856	583	346	346
   query8	334	187	172	172
   query9	8767	4095	4148	4095
   query10	495	366	327	327
   query11	5898	2341	2159	2159
   query12	158	103	108	103
   query13	1276	619	422	422
   query14	6217	5217	4916	4916
   query14_1	4254	4252	4225	4225
   query15	223	208	184	184
   query16	1028	459	490	459
   query17	946	726	580	580
   query18	2496	488	361	361
   query19	214	197	155	155
   query20	110	112	108	108
   query21	228	164	143	143
   query22	13585	13584	13405	13405
   query23	17287	16613	16083	16083
   query23_1	16214	16324	16317	16317
   query24	7544	1783	1279	1279
   query24_1	1289	1274	1286	1274
   query25	571	465	386	386
   query26	1330	362	222	222
   query27	2636	606	389	389
   query28	4506	1994	2015	1994
   query29	1096	620	501	501
   query30	348	267	235	235
   query31	1115	1100	995	995
   query32	110	73	62	62
   query33	530	338	267	267
   query34	1185	1131	633	633
   query35	769	783	677	677
   query36	1035	1012	886	886
   query37	156	117	104	104
   query38	1860	1723	1641	1641
   query39	882	880	841	841
   query39_1	835	838	845	838
   query40	248	166	146	146
   query41	69	67	64	64
   query42	92	101	93	93
   query43	326	323	280	280
   query44	1426	747	756	747
   query45	200	186	178	178
   query46	1098	1179	709	709
   query47	2159	2118	2043	2043
   query48	381	398	293	293
   query49	585	425	303	303
   query50	1028	443	339	339
   query51	10345	10430	10587	10430
   query52	87	87	75	75
   query53	265	266	199	199
   query54	275	232	219	219
   query55	74	69	65	65
   query56	307	305	309	305
   query57	1305	1296	1211	1211
   query58	286	264	236	236
   query59	1574	1685	1441	1441
   query60	313	283	246	246
   query61	157	149	151	149
   query62	552	509	435	435
   query63	243	200	198	198
   query64	2815	1093	845	845
   query65	4702	4641	4641	4641
   query66	1883	505	392	392
   query67	29392	29396	29176	29176
   query68	3013	1492	1009	1009
   query69	409	309	265	265
   query70	944	860	810	810
   query71	371	336	323	323
   query72	3186	2701	2377	2377
   query73	811	854	402	402
   query74	5075	4902	4750	4750
   query75	2567	2489	2141	2141
   query76	2340	1192	767	767
   query77	348	385	295	295
   query78	11948	12039	11474	11474
   query79	1407	1136	744	744
   query80	1294	548	460	460
   query81	555	335	292	292
   query82	618	161	123	123
   query83	382	322	301	301
   query84	332	156	135	135
   query85	988	627	530	530
   query86	403	250	229	229
   query87	1835	1818	1764	1764
   query88	3707	2788	2782	2782
   query89	441	384	330	330
   query90	1925	208	204	204
   query91	202	194	169	169
   query92	67	62	61	61
   query93	1757	1482	917	917
   query94	717	356	328	328
   query95	813	500	566	500
   query96	1043	773	346	346
   query97	2629	2627	2522	2522
   query98	217	220	199	199
   query99	1097	1122	984	984
   Total cold run time: 263211 ms
   Total hot run time: 177874 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #63363:
URL: https://github.com/apache/doris/pull/63363#discussion_r3338363867


##########
be/src/util/dns_cache.cpp:
##########
@@ -97,26 +151,57 @@ Status DNSCache::_update(const std::string& hostname) {
         cache[hostname] = real_ip;
         LOG(INFO) << "update hostname " << hostname << "'s ip to " << real_ip;

Review Comment:
   This insert can reintroduce a hostname that the refresh thread has just evicted. A real caller can enter `get()` while the host is cached, miss DNS inside `_resolve_hostname()`, then the refresh thread reaches the threshold and calls `_erase()` while DNS resolution is still blocked. `_resolve_hostname()` returns the previously captured `cached_ip` with `failures == 0`, and `_update()` then sees `cache.find(hostname) == end` here and writes the stale IP back into `cache`. That defeats the purpose of eviction and lets brpc callers continue using the removed backend address. The new race test acknowledges this by calling `_resolve_hostname()` directly to avoid the `_update()` reinsert, but production callers go through `_update()`. Please make `_update()` distinguish resolved IPs from fallback cached IPs and avoid inserting the fallback when the entry disappeared during resolution, or otherwise re-check the eviction state before writing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4891882987

   # BE UT Coverage Report
   Increment line coverage `95.06% (77/81)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/8e1bac4ce786a9aa15d89c5ac23e4466e645e62c_8e1bac4ce786a9aa15d89c5ac23e4466e645e62c/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/8e1bac4ce786a9aa15d89c5ac23e4466e645e62c_8e1bac4ce786a9aa15d89c5ac23e4466e645e62c/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 56.39% (23059/40895) |
   | Line Coverage     | 40.05% (224134/559596) |
   | Region Coverage   | 36.10% (177472/491631) |
   | Branch Coverage   | 37.11% (78821/212423) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5118428346

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 176832 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit fa74d5033267476a1c0007f123026b3bda4d2e14, data reload: false
   
   query5	4322	625	487	487
   query6	466	229	201	201
   query7	4828	601	307	307
   query8	334	185	182	182
   query9	8765	4018	4051	4018
   query10	476	358	312	312
   query11	5947	2351	2105	2105
   query12	164	110	103	103
   query13	1265	617	449	449
   query14	6642	5187	4856	4856
   query14_1	4222	4203	4189	4189
   query15	210	206	180	180
   query16	1003	497	485	485
   query17	1094	719	543	543
   query18	2711	487	333	333
   query19	204	187	143	143
   query20	112	106	106	106
   query21	230	154	134	134
   query22	13513	13701	13305	13305
   query23	17293	16582	16017	16017
   query23_1	16156	16077	16118	16077
   query24	7504	1766	1284	1284
   query24_1	1347	1287	1271	1271
   query25	548	471	396	396
   query26	1322	377	218	218
   query27	2531	624	359	359
   query28	4477	2041	2016	2016
   query29	1112	650	502	502
   query30	339	266	229	229
   query31	1114	1093	986	986
   query32	113	63	61	61
   query33	539	305	245	245
   query34	1159	1147	646	646
   query35	755	785	660	660
   query36	1017	1023	863	863
   query37	151	103	92	92
   query38	1865	1715	1618	1618
   query39	895	868	847	847
   query39_1	831	842	835	835
   query40	244	167	137	137
   query41	66	61	61	61
   query42	94	91	87	87
   query43	323	322	282	282
   query44	1418	814	748	748
   query45	195	180	172	172
   query46	1058	1166	742	742
   query47	2098	2098	1940	1940
   query48	387	411	308	308
   query49	581	420	320	320
   query50	1121	442	325	325
   query51	10520	10586	10690	10586
   query52	91	85	74	74
   query53	265	276	204	204
   query54	283	233	217	217
   query55	73	70	68	68
   query56	301	293	290	290
   query57	1313	1290	1184	1184
   query58	286	247	267	247
   query59	1584	1630	1436	1436
   query60	304	278	257	257
   query61	158	151	152	151
   query62	545	497	434	434
   query63	249	203	202	202
   query64	2839	1097	871	871
   query65	4698	4605	4623	4605
   query66	1770	504	390	390
   query67	29199	29146	29023	29023
   query68	3024	1537	1062	1062
   query69	415	306	265	265
   query70	931	829	833	829
   query71	404	346	341	341
   query72	3087	2774	2324	2324
   query73	822	783	448	448
   query74	5076	4881	4711	4711
   query75	2510	2479	2134	2134
   query76	2334	1148	809	809
   query77	362	379	284	284
   query78	11930	11821	11388	11388
   query79	1219	1107	733	733
   query80	611	545	464	464
   query81	464	331	289	289
   query82	234	165	121	121
   query83	323	328	300	300
   query84	281	162	131	131
   query85	894	628	513	513
   query86	292	239	226	226
   query87	1815	1808	1746	1746
   query88	3669	2837	2809	2809
   query89	399	384	347	347
   query90	2138	206	204	204
   query91	204	198	158	158
   query92	62	58	54	54
   query93	1668	1461	1011	1011
   query94	540	346	306	306
   query95	771	594	460	460
   query96	1015	815	367	367
   query97	2617	2616	2474	2474
   query98	208	216	213	213
   query99	1096	1107	984	984
   Total cold run time: 261317 ms
   Total hot run time: 176832 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5151676581

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 28572 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 19530d60fd6bca8cb12ea01cc278bc2b3309bfca, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17630	3884	3868	3868
   q2	2075	321	203	203
   q3	10255	1339	801	801
   q4	4710	462	332	332
   q5	7626	830	562	562
   q6	207	167	139	139
   q7	764	808	591	591
   q8	10172	1634	1544	1544
   q9	5936	4059	4008	4008
   q10	6795	1628	1377	1377
   q11	508	350	317	317
   q12	779	572	458	458
   q13	18250	3215	2733	2733
   q14	270	259	243	243
   q15	q16	744	733	668	668
   q17	1022	1057	961	961
   q18	6824	5789	5435	5435
   q19	1565	1328	1094	1094
   q20	782	663	578	578
   q21	5665	2629	2361	2361
   q22	425	362	299	299
   Total cold run time: 103004 ms
   Total hot run time: 28572 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4240	4142	4356	4142
   q2	276	321	205	205
   q3	4568	4925	4355	4355
   q4	2126	2227	1478	1478
   q5	4240	4137	4168	4137
   q6	251	174	132	132
   q7	1706	1546	1778	1546
   q8	2545	2131	2072	2072
   q9	7157	7219	7200	7200
   q10	4310	4298	3928	3928
   q11	546	386	358	358
   q12	705	721	514	514
   q13	3164	3633	2908	2908
   q14	302	303	268	268
   q15	q16	712	741	648	648
   q17	1341	1303	1272	1272
   q18	8049	7225	7081	7081
   q19	1096	1073	1066	1066
   q20	2192	2238	1908	1908
   q21	5225	4606	4347	4347
   q22	505	452	407	407
   Total cold run time: 55256 ms
   Total hot run time: 49972 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514962875

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 169661 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit ba7753619f484a52133396ad47602fad07f196a9, data reload: false
   
   query5	4362	650	507	507
   query6	333	228	199	199
   query7	4262	598	309	309
   query8	322	227	227	227
   query9	8827	4004	4055	4004
   query10	448	345	287	287
   query11	5808	2391	2168	2168
   query12	185	128	125	125
   query13	1270	586	425	425
   query14	6019	5364	5065	5065
   query14_1	4384	4670	4349	4349
   query15	216	206	187	187
   query16	986	426	457	426
   query17	1188	735	616	616
   query18	2472	509	368	368
   query19	221	206	165	165
   query20	137	132	126	126
   query21	221	142	125	125
   query22	13607	13664	13292	13292
   query23	17185	16379	15980	15980
   query23_1	16178	16019	16199	16019
   query24	7761	1748	1309	1309
   query24_1	1313	1304	1297	1297
   query25	575	462	413	413
   query26	1306	319	162	162
   query27	2734	534	336	336
   query28	4449	1973	1953	1953
   query29	976	618	493	493
   query30	316	237	198	198
   query31	1124	1079	952	952
   query32	89	73	73	73
   query33	531	348	281	281
   query34	1171	1159	646	646
   query35	766	778	665	665
   query36	1300	1322	1226	1226
   query37	150	99	88	88
   query38	3207	3137	3062	3062
   query39	938	925	908	908
   query39_1	885	900	905	900
   query40	252	147	122	122
   query41	65	65	62	62
   query42	105	111	111	111
   query43	329	329	290	290
   query44	
   query45	217	207	208	207
   query46	1080	1170	736	736
   query47	2322	2288	2160	2160
   query48	397	412	288	288
   query49	633	494	383	383
   query50	976	351	265	265
   query51	4388	4267	4225	4225
   query52	100	102	93	93
   query53	254	284	203	203
   query54	322	264	250	250
   query55	91	88	86	86
   query56	291	312	298	298
   query57	1410	1372	1301	1301
   query58	299	285	283	283
   query59	1569	1621	1384	1384
   query60	357	342	318	318
   query61	187	185	188	185
   query62	698	630	546	546
   query63	240	201	209	201
   query64	2463	845	691	691
   query65	
   query66	1761	492	373	373
   query67	29986	29921	29911	29911
   query68	
   query69	476	349	318	318
   query70	1046	1023	1001	1001
   query71	317	279	278	278
   query72	3099	2679	2409	2409
   query73	827	770	413	413
   query74	5090	4939	4734	4734
   query75	2661	2600	2259	2259
   query76	2272	1162	773	773
   query77	407	409	328	328
   query78	12149	12071	11583	11583
   query79	1471	1019	704	704
   query80	901	530	448	448
   query81	496	281	241	241
   query82	1331	158	126	126
   query83	356	275	248	248
   query84	267	138	114	114
   query85	936	552	440	440
   query86	440	334	314	314
   query87	3415	3354	3204	3204
   query88	3556	2686	2687	2686
   query89	443	385	331	331
   query90	1784	179	184	179
   query91	181	167	143	143
   query92	87	90	77	77
   query93	1504	1423	867	867
   query94	627	362	330	330
   query95	672	492	345	345
   query96	1008	780	346	346
   query97	2681	2680	2574	2574
   query98	242	244	230	230
   query99	1134	1087	990	990
   Total cold run time: 253748 ms
   Total hot run time: 169661 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4515309691

   # BE UT Coverage Report
   Increment line coverage `95.95% (71/74)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/ba7753619f484a52133396ad47602fad07f196a9_ba7753619f484a52133396ad47602fad07f196a9/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/ba7753619f484a52133396ad47602fad07f196a9_ba7753619f484a52133396ad47602fad07f196a9/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 53.69% (20770/38683) |
   | Line Coverage     | 37.28% (196768/527822) |
   | Region Coverage   | 33.62% (154303/458969) |
   | Branch Coverage   | 34.60% (67169/194120) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5116514741

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4628800067

   /revie


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4889959240

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4891011191

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29578 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 8e1bac4ce786a9aa15d89c5ac23e4466e645e62c, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	18096	4080	4034	4034
   q2	2001	338	197	197
   q3	10302	1437	839	839
   q4	4715	467	338	338
   q5	7719	871	580	580
   q6	238	167	134	134
   q7	776	831	623	623
   q8	10652	1534	1573	1534
   q9	5982	4463	4413	4413
   q10	6818	1774	1516	1516
   q11	507	354	322	322
   q12	705	546	439	439
   q13	18102	3398	2757	2757
   q14	280	262	247	247
   q15	q16	796	784	711	711
   q17	1045	936	900	900
   q18	7037	5755	5517	5517
   q19	1177	1280	1156	1156
   q20	775	674	505	505
   q21	5549	2594	2519	2519
   q22	438	365	297	297
   Total cold run time: 103710 ms
   Total hot run time: 29578 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4524	4270	4268	4268
   q2	275	308	210	210
   q3	4608	4947	4387	4387
   q4	2073	2151	1371	1371
   q5	4435	4364	4351	4351
   q6	233	175	123	123
   q7	2228	1976	1623	1623
   q8	2532	2191	2173	2173
   q9	7867	7904	7950	7904
   q10	4764	4733	4279	4279
   q11	777	453	376	376
   q12	754	755	539	539
   q13	3348	3619	3002	3002
   q14	294	302	284	284
   q15	q16	709	755	655	655
   q17	1415	1366	1325	1325
   q18	8018	7504	6968	6968
   q19	1161	1095	1109	1095
   q20	2226	2288	1933	1933
   q21	5236	4568	4467	4467
   q22	527	462	395	395
   Total cold run time: 58004 ms
   Total hot run time: 51728 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5130109149

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29485 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit fa3c0584fe777ad6e6612f65b98ad559ed359f7f, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17597	4038	3990	3990
   q2	2356	318	207	207
   q3	10551	1453	814	814
   q4	4687	467	334	334
   q5	7883	863	575	575
   q6	209	170	136	136
   q7	784	835	612	612
   q8	10324	1602	1697	1602
   q9	7013	4407	4451	4407
   q10	7434	1731	1445	1445
   q11	662	357	330	330
   q12	760	576	472	472
   q13	18666	3406	2782	2782
   q14	263	255	250	250
   q15	q16	791	782	706	706
   q17	1044	948	1031	948
   q18	7120	5726	5560	5560
   q19	1186	1293	1007	1007
   q20	772	703	594	594
   q21	5810	2694	2410	2410
   q22	428	349	304	304
   Total cold run time: 106340 ms
   Total hot run time: 29485 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4371	4335	4310	4310
   q2	293	322	211	211
   q3	4625	4937	4433	4433
   q4	2064	2135	1375	1375
   q5	4397	4261	4844	4261
   q6	238	178	128	128
   q7	1878	1714	1537	1537
   q8	2464	2141	2054	2054
   q9	7644	7807	7747	7747
   q10	4687	4629	4204	4204
   q11	589	415	429	415
   q12	767	751	539	539
   q13	3222	3311	2771	2771
   q14	297	292	276	276
   q15	q16	698	750	633	633
   q17	1335	1281	1241	1241
   q18	7907	7403	7300	7300
   q19	1232	1187	1171	1171
   q20	2214	2217	1972	1972
   q21	5239	4541	4390	4390
   q22	542	474	401	401
   Total cold run time: 56703 ms
   Total hot run time: 51369 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5141091938

   Codex automated review failed and did not complete.
   
   Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Aug 5th, 2026 4:09 AM.
   Workflow run: https://github.com/apache/doris/actions/runs/30616305377
   
   Please inspect the workflow logs and rerun the review after the underlying issue is resolved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5151713763

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 169776 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 19530d60fd6bca8cb12ea01cc278bc2b3309bfca, data reload: false
   
   query5	4318	614	490	490
   query6	472	225	201	201
   query7	4838	599	343	343
   query8	334	186	164	164
   query9	8767	4008	4005	4005
   query10	493	341	279	279
   query11	5827	2202	2022	2022
   query12	156	101	97	97
   query13	1267	590	429	429
   query14	6145	4689	4433	4433
   query14_1	3844	3805	3827	3805
   query15	212	200	175	175
   query16	1036	492	468	468
   query17	1123	712	563	563
   query18	2629	469	346	346
   query19	207	195	152	152
   query20	107	103	100	100
   query21	240	162	137	137
   query22	13004	13030	12809	12809
   query23	17201	16289	16049	16049
   query23_1	16110	16131	16056	16056
   query24	7565	1698	1208	1208
   query24_1	1256	1248	1252	1248
   query25	535	422	355	355
   query26	1307	361	207	207
   query27	2576	572	389	389
   query28	4434	2028	2010	2010
   query29	1041	614	457	457
   query30	338	275	241	241
   query31	1115	1065	957	957
   query32	104	60	57	57
   query33	520	307	241	241
   query34	1191	1135	648	648
   query35	732	760	663	663
   query36	797	778	731	731
   query37	156	101	87	87
   query38	1822	1647	1603	1603
   query39	835	841	801	801
   query39_1	776	779	823	779
   query40	250	176	139	139
   query41	69	62	67	62
   query42	92	95	91	91
   query43	322	316	278	278
   query44	1426	753	756	753
   query45	198	181	163	163
   query46	1049	1176	709	709
   query47	1542	1517	1444	1444
   query48	378	410	283	283
   query49	570	416	290	290
   query50	1057	412	328	328
   query51	10964	10662	10697	10662
   query52	90	87	79	79
   query53	255	279	201	201
   query54	282	242	220	220
   query55	77	69	66	66
   query56	311	293	289	289
   query57	1027	1025	927	927
   query58	294	255	259	255
   query59	1544	1610	1404	1404
   query60	309	279	259	259
   query61	161	149	150	149
   query62	388	319	262	262
   query63	233	200	201	200
   query64	2855	1070	932	932
   query65	3912	3838	3841	3838
   query66	1806	488	382	382
   query67	28287	28235	28041	28041
   query68	3251	1527	927	927
   query69	408	310	267	267
   query70	877	808	812	808
   query71	409	342	328	328
   query72	3378	2829	2346	2346
   query73	843	772	443	443
   query74	4591	4496	4303	4303
   query75	2374	2332	1987	1987
   query76	2358	1137	754	754
   query77	342	364	282	282
   query78	11179	11165	10701	10701
   query79	1382	1096	730	730
   query80	1297	543	466	466
   query81	564	337	279	279
   query82	619	152	119	119
   query83	373	320	305	305
   query84	282	159	133	133
   query85	953	602	545	545
   query86	408	251	223	223
   query87	1790	1830	1730	1730
   query88	3730	2816	2797	2797
   query89	397	326	319	319
   query90	1876	184	196	184
   query91	195	195	165	165
   query92	61	62	54	54
   query93	1767	1581	917	917
   query94	728	357	312	312
   query95	802	523	549	523
   query96	1014	822	326	326
   query97	2446	2431	2352	2352
   query98	206	194	191	191
   query99	721	718	614	614
   Total cold run time: 257009 ms
   Total hot run time: 169776 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4485255532

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4476385374

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4483796575

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514919690

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31235 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 53beb25ff29c516ea44ab10fd952a4e67c6b3443, data reload: false
   
   ------ Round 1 ----------------------------------
   orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	17646	3855	3821	3821
   q2	q3	10792	1421	816	816
   q4	4688	479	347	347
   q5	7566	2292	2109	2109
   q6	235	175	137	137
   q7	931	782	643	643
   q8	9374	1760	1571	1571
   q9	5525	4919	4865	4865
   q10	6474	2097	1830	1830
   q11	445	273	245	245
   q12	689	432	298	298
   q13	18135	3425	2790	2790
   q14	271	256	235	235
   q15	q16	834	773	713	713
   q17	1003	921	1030	921
   q18	6995	5897	5527	5527
   q19	1141	1302	1123	1123
   q20	568	524	301	301
   q21	5863	2753	2612	2612
   q22	473	374	331	331
   Total cold run time: 99648 ms
   Total hot run time: 31235 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	4800	4459	4517	4459
   q2	q3	4817	5238	4573	4573
   q4	2124	2226	1424	1424
   q5	4791	4769	4717	4717
   q6	229	175	130	130
   q7	1795	1756	1489	1489
   q8	2686	2146	2061	2061
   q9	7826	7437	7245	7245
   q10	4465	4403	3964	3964
   q11	531	378	355	355
   q12	802	713	506	506
   q13	3016	3326	2818	2818
   q14	271	272	242	242
   q15	q16	675	697	614	614
   q17	1291	1245	1233	1233
   q18	7339	6728	6986	6728
   q19	1129	1122	1105	1105
   q20	2216	2202	1924	1924
   q21	5323	4667	4458	4458
   q22	509	494	405	405
   Total cold run time: 56635 ms
   Total hot run time: 50450 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514936687

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 30882 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 56a256e99da0d555aa5f6e4135eadbebc7587954, data reload: false
   
   ------ Round 1 ----------------------------------
   orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	17597	3884	3870	3870
   q2	q3	10824	1361	822	822
   q4	4680	472	348	348
   q5	7577	2255	2060	2060
   q6	225	176	137	137
   q7	917	747	651	651
   q8	9361	1692	1507	1507
   q9	5064	4851	4891	4851
   q10	6397	2067	1794	1794
   q11	441	280	244	244
   q12	634	419	288	288
   q13	18091	3361	2764	2764
   q14	265	248	247	247
   q15	q16	817	762	712	712
   q17	981	859	939	859
   q18	7065	5774	5454	5454
   q19	1318	1273	961	961
   q20	497	396	272	272
   q21	6368	2771	2721	2721
   q22	439	370	320	320
   Total cold run time: 99558 ms
   Total hot run time: 30882 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	4832	4497	4624	4497
   q2	q3	4872	5266	4619	4619
   q4	2198	2231	1399	1399
   q5	4706	4805	4617	4617
   q6	232	176	131	131
   q7	1775	1791	1606	1606
   q8	2366	2048	2038	2038
   q9	7685	7538	7213	7213
   q10	4483	4387	3951	3951
   q11	518	375	347	347
   q12	697	709	509	509
   q13	2998	3371	2730	2730
   q14	282	270	252	252
   q15	q16	674	711	620	620
   q17	1256	1233	1233	1233
   q18	7222	6679	6714	6679
   q19	1111	1106	1101	1101
   q20	2222	2196	1921	1921
   q21	5299	4599	4440	4440
   q22	512	454	408	408
   Total cold run time: 55940 ms
   Total hot run time: 50311 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5090696568

   # BE Regression && UT Coverage Report
   Increment line coverage `98.50% (131/133)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_e10d7e9ffe771271681707216dfffb5bdb658f7a_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_e10d7e9ffe771271681707216dfffb5bdb658f7a_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 75.40% (31164/41331) |
   | Line Coverage     | 59.90% (347257/579719) |
   | Region Coverage   | 56.67% (291997/515292) |
   | Branch Coverage   | 57.96% (130486/225116) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5140890404

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5128149352

   # BE Regression && UT Coverage Report
   Increment line coverage `95.74% (135/141)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_5a16b261c953a5253c8e991fc04130734fbb69ea_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_5a16b261c953a5253c8e991fc04130734fbb69ea_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 75.66% (31950/42226) |
   | Line Coverage     | 60.29% (355886/590332) |
   | Region Coverage   | 56.85% (298404/524896) |
   | Branch Coverage   | 58.31% (134493/230662) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5121305426

   # BE Regression && UT Coverage Report
   Increment line coverage `95.74% (135/141)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_fa74d5033267476a1c0007f123026b3bda4d2e14_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_fa74d5033267476a1c0007f123026b3bda4d2e14_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 75.75% (31985/42225) |
   | Line Coverage     | 60.40% (356552/590323) |
   | Region Coverage   | 57.04% (299387/524888) |
   | Branch Coverage   | 58.39% (134689/230654) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5138266828

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #63363:
URL: https://github.com/apache/doris/pull/63363#discussion_r3360814521


##########
be/src/util/dns_cache.cpp:
##########
@@ -97,26 +151,57 @@ Status DNSCache::_update(const std::string& hostname) {
         cache[hostname] = real_ip;
         LOG(INFO) << "update hostname " << hostname << "'s ip to " << real_ip;
     }
+    // Read failure_count under the same lock we already hold, so _refresh_once
+    // does not need a second lock acquisition to decide on eviction.
+    if (out_failures) {
+        auto fc_it = failure_count.find(hostname);
+        *out_failures = fc_it != failure_count.end() ? fc_it->second : 0;
+    }
     return Status::OK();
 }
 
+void DNSCache::_refresh_once() {
+    std::unordered_set<std::string> keys;
+    {
+        std::shared_lock<std::shared_mutex> lock(mutex);
+        std::transform(cache.begin(), cache.end(), std::inserter(keys, keys.end()),
+                       [](const auto& pair) { return pair.first; });
+    }
+    for (auto& key : keys) {
+        uint32_t failures = 0;
+        Status st = _update(key, &failures);
+        if (!st.ok()) {
+            // _update only returns an error when _resolve_hostname returns an
+            // empty string, which happens only if the hostname has never been
+            // successfully resolved (no cached IP to fall back to).  Keys in
+            // the refresh loop come from `cache`, so they all have a prior IP;
+            // during DNS failure _resolve_hostname returns that cached IP and
+            // _update returns OK.  This branch is therefore effectively dead
+            // under normal refresh semantics — the eviction logic below handles
+            // the long-running failure case instead.
+            LOG(WARNING) << "Failed to update DNS cache for hostname " << key << ": "
+                         << st.to_string();
+        }
+        // Evict hostnames that have failed to resolve for too long.
+        // This avoids two pathological symptoms after a backend is dropped
+        // from the cluster and its DNS record is removed:
+        //   1) be.WARNING gets flooded with `failed to get ip from host`.
+        //   2) brpc keeps re-using the stale IP from cache, producing
+        //      `Fail to wait EPOLLOUT ... Connection timed out`.
+        int32_t threshold = config::dns_cache_max_consecutive_failures;
+        if (threshold > 0 && failures >= static_cast<uint32_t>(threshold)) {
+            LOG(WARNING) << "Evicting hostname " << key << " from DNS cache after " << failures
+                         << " consecutive resolution failures";
+            _erase(key);
+        }

Review Comment:
   Adding `_erase()` makes the final read in `get()` unsafe: a caller can miss the cache, `_update()` can resolve and insert the IP, then a refresh cycle with `dns_cache_max_consecutive_failures=1` can erase this hostname before `get()` reacquires its shared lock and executes `*ip = cache[hostname]`. That `operator[]` mutates the unordered_map while only a `shared_lock` is held and also reintroduces the hostname with an empty IP while returning `Status::OK`. Please avoid `operator[]` on the read path and make `get()` consume the IP returned by `_update()` or re-check with `find()` under the proper lock/error path after eviction. This is separate from the already-raised stale fallback reinsert in `_update()`.



##########
be/test/util/dns_cache_test.cpp:
##########
@@ -0,0 +1,254 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "util/dns_cache.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+
+#include "common/config.h"
+#include "gtest/gtest_pred_impl.h"
+
+namespace doris {
+
+class DNSCacheTest : public testing::Test {
+public:
+    DNSCacheTest() = default;
+    ~DNSCacheTest() override = default;
+
+protected:
+    void SetUp() override {
+        _saved_threshold = config::dns_cache_max_consecutive_failures;
+        _saved_log_every = config::dns_cache_log_every_n_failures;
+    }
+
+    void TearDown() override {
+        config::dns_cache_max_consecutive_failures = _saved_threshold;
+        config::dns_cache_log_every_n_failures = _saved_log_every;
+    }
+
+    // Build a resolver whose failure behaviour can be flipped at runtime.
+    static DNSCache::Resolver make_resolver(bool* should_fail, const std::string& ip = "1.2.3.4") {
+        return [should_fail, ip](const std::string&, std::string& out, bool) -> Status {
+            if (*should_fail) {
+                return Status::InternalError("mock failure");
+            }
+            out = ip;
+            return Status::OK();
+        };
+    }
+
+private:
+    int32_t _saved_threshold = 0;
+    int32_t _saved_log_every = 0;
+};
+
+// ── existing tests ────────────────────────────────────────────────────────────
+
+// Sanity: localhost resolves successfully and is cached.
+TEST_F(DNSCacheTest, resolve_localhost) {
+    DNSCache cache;
+    std::string ip;

Review Comment:
   These tests default-construct `DNSCache`, which starts the production refresh thread. The destructor sets `stop_refresh` and then joins, but the thread is usually inside `sleep_for(std::chrono::minutes(1))`, so every test that uses this constructor can block for up to a minute during teardown. This file has four such tests, making the BE UT suite spend several minutes just waiting for DNSCache destructors. Please use the injected-resolver constructor for unit tests (or make the production thread interruptible) so tests do not depend on the 60s background sleep.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #63363:
URL: https://github.com/apache/doris/pull/63363#discussion_r3653768544


##########
be/src/util/dns_cache.cpp:
##########
@@ -67,26 +73,74 @@ std::string DNSCache::_resolve_hostname(const std::string& hostname) {
 
     // Try to resolve hostname
     std::string resolved_ip;
-    Status status = hostname_to_ip(hostname, resolved_ip, BackendOptions::is_bind_ipv6());
+    Status status = _resolver
+                            ? _resolver(hostname, resolved_ip, BackendOptions::is_bind_ipv6())
+                            : hostname_to_ip(hostname, resolved_ip, BackendOptions::is_bind_ipv6());
 
     if (!status.ok() || resolved_ip.empty()) {
-        // Resolution failed
         if (!cached_ip.empty()) {
-            LOG(WARNING) << "Failed to resolve hostname " << hostname
-                         << ", use cached ip: " << cached_ip;
+            // Only track failure counts for hosts that are currently in the cache.
+            // Hosts that were never cached or have already been evicted are not
+            // tracked, which prevents unbounded growth of failure_count.
+            uint32_t failures = 0;
+            {
+                std::unique_lock<std::shared_mutex> lock(mutex);
+                // Re-check that the host is still cached under the unique_lock:
+                // it may have been evicted by the refresh thread between our
+                // earlier shared_lock read of cached_ip and now (hostname_to_ip
+                // can block for seconds on DNS timeout, widening the window).
+                // Skipping the bump here preserves keys(failure_count) ⊆ keys(cache).
+                if (cache.find(hostname) != cache.end()) {
+                    failures = ++failure_count[hostname];
+                }
+            }
+            // Throttle the log: only every N failures or the first failure.
+            if (failures > 0) {
+                int32_t every_n = std::max(1, config::dns_cache_log_every_n_failures);
+                if (failures == 1 || failures % static_cast<uint32_t>(every_n) == 0) {
+                    LOG(WARNING) << "Failed to resolve hostname " << hostname
+                                 << " (consecutive failures: " << failures
+                                 << "), use cached ip: " << cached_ip;
+                }
+            }
             return cached_ip;
         } else {
-            LOG(WARNING) << "Failed to resolve hostname " << hostname << ", no cached ip available";
+            // Throttle to avoid flooding be.WARNING when callers repeatedly
+            // query an evicted or never-resolvable hostname.  This branch
+            // deliberately does not maintain a per-hostname counter (that
+            // would break the keys(failure_count) ⊆ keys(cache) invariant),
+            // so the throttle is a coarse global rate limit shared across
+            // all hostnames hitting this code path.
+            static std::atomic<uint64_t> no_cache_warn_counter {0};

Review Comment:
   After eviction, every retry now misses the cache and performs synchronous `getaddrinfo`, but this counter throttles only the extra `DNSCache` warning. `hostname_to_ipv4/6` has already emitted an unconditional warning for the failed lookup, and `BrpcClientCache` (plus the direct proto/cloud/writer/peer callers) logs the non-OK status again. In the issue's hot retry scenario, eviction therefore changes one background lookup per minute into blocking DNS work and warnings per request, so the caller-side flood remains. Please keep bounded per-host negative/backoff state (without returning the stale IP), centralize/rate-limit the whole warning path, and test repeated normal-client calls after eviction.



##########
be/src/util/dns_cache.cpp:
##########
@@ -97,25 +151,62 @@ Status DNSCache::_update(const std::string& hostname) {
         cache[hostname] = real_ip;
         LOG(INFO) << "update hostname " << hostname << "'s ip to " << real_ip;
     }
+    if (out_ip) *out_ip = real_ip;
+    // Read failure_count under the same lock we already hold, so _refresh_once
+    // does not need a second lock acquisition to decide on eviction.
+    if (out_failures) {
+        auto fc_it = failure_count.find(hostname);
+        *out_failures = fc_it != failure_count.end() ? fc_it->second : 0;
+    }
     return Status::OK();
 }
 
+void DNSCache::_refresh_once() {
+    std::unordered_set<std::string> keys;
+    {
+        std::shared_lock<std::shared_mutex> lock(mutex);
+        std::transform(cache.begin(), cache.end(), std::inserter(keys, keys.end()),
+                       [](const auto& pair) { return pair.first; });
+    }
+    for (auto& key : keys) {
+        uint32_t failures = 0;
+        Status st = _update(key, &failures);
+        if (!st.ok()) {
+            // _update only returns an error when _resolve_hostname returns an
+            // empty string, which happens only if the hostname has never been
+            // successfully resolved (no cached IP to fall back to).  Keys in
+            // the refresh loop come from `cache`, so they all have a prior IP;
+            // during DNS failure _resolve_hostname returns that cached IP and
+            // _update returns OK.  This branch is therefore effectively dead
+            // under normal refresh semantics — the eviction logic below handles
+            // the long-running failure case instead.
+            LOG(WARNING) << "Failed to update DNS cache for hostname " << key << ": "
+                         << st.to_string();
+        }
+        // Evict hostnames that have failed to resolve for too long.
+        // This avoids two pathological symptoms after a backend is dropped
+        // from the cluster and its DNS record is removed:
+        //   1) be.WARNING gets flooded with `failed to get ip from host`.
+        //   2) brpc keeps re-using the stale IP from cache, producing
+        //      `Fail to wait EPOLLOUT ... Connection timed out`.
+        int32_t threshold = config::dns_cache_max_consecutive_failures;
+        if (threshold > 0 && failures >= static_cast<uint32_t>(threshold)) {

Review Comment:
   At `dns_cache_max_consecutive_failures=1`, this decision can erase a newer successful generation. Start caller G on an absent key and block its successful DNS lookup; let caller H resolve and insert the key; then let refresh snapshot it, fail once, and return `failures == 1`. If G now completes, it clears `failure_count` and publishes a fresh result before refresh reaches this check, but refresh still uses the captured `1` and `_erase()` deletes G's success. This is distinct from the existing stale-fallback reinsert at line 152: fixing fallback provenance does not fence this later erase. Please re-check the live counter/generation under the same lock as erase and add a barrier-controlled test for this handoff.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5130228316

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 177544 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit fa3c0584fe777ad6e6612f65b98ad559ed359f7f, data reload: false
   
   query5	4319	607	475	475
   query6	486	218	206	206
   query7	4908	593	347	347
   query8	340	186	168	168
   query9	8788	4021	4030	4021
   query10	444	372	294	294
   query11	5879	2323	2151	2151
   query12	158	103	102	102
   query13	1270	611	446	446
   query14	6311	5192	4900	4900
   query14_1	4215	4210	4207	4207
   query15	207	205	181	181
   query16	3259	524	436	436
   query17	1107	703	555	555
   query18	2203	461	332	332
   query19	209	179	139	139
   query20	113	108	114	108
   query21	501	157	128	128
   query22	13607	13484	13351	13351
   query23	17192	16521	16157	16157
   query23_1	16333	16172	16256	16172
   query24	7673	1765	1264	1264
   query24_1	1312	1268	1277	1268
   query25	571	433	363	363
   query26	1403	358	203	203
   query27	2481	593	399	399
   query28	4460	2039	2032	2032
   query29	1047	605	476	476
   query30	383	255	225	225
   query31	1103	1091	980	980
   query32	104	61	58	58
   query33	555	310	250	250
   query34	1184	1129	656	656
   query35	754	779	653	653
   query36	1032	1049	879	879
   query37	154	97	87	87
   query38	1879	1698	1602	1602
   query39	895	900	852	852
   query39_1	828	836	852	836
   query40	259	155	142	142
   query41	79	80	75	75
   query42	98	90	92	90
   query43	325	321	270	270
   query44	1390	780	771	771
   query45	199	178	171	171
   query46	1085	1206	730	730
   query47	2161	2108	2033	2033
   query48	395	423	308	308
   query49	631	402	302	302
   query50	1052	422	343	343
   query51	11078	11018	10966	10966
   query52	87	86	74	74
   query53	263	272	208	208
   query54	286	221	245	221
   query55	74	69	67	67
   query56	275	298	302	298
   query57	1318	1287	1201	1201
   query58	281	243	253	243
   query59	1569	1646	1382	1382
   query60	314	266	252	252
   query61	145	162	168	162
   query62	547	501	440	440
   query63	244	211	207	207
   query64	2563	1113	946	946
   query65	4745	4642	4611	4611
   query66	1748	495	392	392
   query67	29191	29357	29123	29123
   query68	3115	1596	944	944
   query69	425	312	288	288
   query70	908	871	838	838
   query71	381	341	342	341
   query72	3400	2807	2409	2409
   query73	841	799	428	428
   query74	5075	4899	4689	4689
   query75	2514	2491	2139	2139
   query76	1883	1155	766	766
   query77	358	385	278	278
   query78	11861	11862	11406	11406
   query79	1594	1146	813	813
   query80	1171	527	469	469
   query81	577	331	285	285
   query82	586	154	116	116
   query83	359	321	291	291
   query84	359	157	139	139
   query85	1050	593	528	528
   query86	429	253	225	225
   query87	1822	1814	1752	1752
   query88	3814	2840	2816	2816
   query89	431	370	328	328
   query90	1899	194	192	192
   query91	198	188	161	161
   query92	64	59	55	55
   query93	1708	1459	984	984
   query94	718	346	312	312
   query95	782	570	467	467
   query96	1091	782	340	340
   query97	2668	2646	2551	2551
   query98	227	221	200	200
   query99	1151	1109	981	981
   Total cold run time: 266452 ms
   Total hot run time: 177544 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4891168328

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 25.12 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 8e1bac4ce786a9aa15d89c5ac23e4466e645e62c, data reload: false
   
   query1	0.00	0.00	0.00
   query2	0.09	0.05	0.05
   query3	0.28	0.14	0.14
   query4	1.61	0.14	0.14
   query5	0.24	0.22	0.22
   query6	1.29	1.11	1.06
   query7	0.04	0.01	0.01
   query8	0.06	0.04	0.05
   query9	0.38	0.31	0.31
   query10	0.55	0.59	0.53
   query11	0.18	0.14	0.13
   query12	0.18	0.14	0.14
   query13	0.48	0.47	0.47
   query14	1.00	1.02	1.00
   query15	0.61	0.61	0.60
   query16	0.32	0.34	0.33
   query17	1.10	1.07	1.11
   query18	0.23	0.22	0.21
   query19	2.11	1.96	1.93
   query20	0.02	0.01	0.01
   query21	15.43	0.19	0.13
   query22	4.86	0.05	0.05
   query23	16.14	0.32	0.12
   query24	2.96	0.44	0.31
   query25	0.11	0.06	0.04
   query26	0.73	0.22	0.15
   query27	0.05	0.04	0.03
   query28	3.46	0.96	0.55
   query29	12.53	4.32	3.47
   query30	0.28	0.16	0.15
   query31	2.76	0.57	0.32
   query32	3.22	0.60	0.49
   query33	3.16	3.15	3.20
   query34	15.51	4.16	3.49
   query35	3.55	3.49	3.53
   query36	0.55	0.44	0.43
   query37	0.09	0.06	0.07
   query38	0.05	0.04	0.04
   query39	0.04	0.03	0.03
   query40	0.18	0.17	0.15
   query41	0.09	0.03	0.03
   query42	0.04	0.03	0.02
   query43	0.04	0.03	0.03
   Total cold run time: 96.6 s
   Total hot run time: 25.12 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5141525080

   I will review it this weekend


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #63363:
URL: https://github.com/apache/doris/pull/63363


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5118296515

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29739 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit fa74d5033267476a1c0007f123026b3bda4d2e14, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17878	4109	4095	4095
   q2	2007	352	204	204
   q3	10268	1503	815	815
   q4	4685	470	347	347
   q5	7510	862	601	601
   q6	193	174	140	140
   q7	784	839	630	630
   q8	9368	1646	1584	1584
   q9	5604	4422	4438	4422
   q10	6816	1735	1479	1479
   q11	518	353	326	326
   q12	721	576	453	453
   q13	18104	3954	2807	2807
   q14	264	272	243	243
   q15	q16	800	775	709	709
   q17	1056	907	1038	907
   q18	7120	5704	5571	5571
   q19	1167	1214	1117	1117
   q20	793	658	614	614
   q21	5738	2607	2379	2379
   q22	440	354	296	296
   Total cold run time: 101834 ms
   Total hot run time: 29739 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4421	4331	4343	4331
   q2	297	324	216	216
   q3	4569	5174	4431	4431
   q4	2068	2148	1365	1365
   q5	4453	4251	4298	4251
   q6	233	180	131	131
   q7	1739	2326	1654	1654
   q8	2555	2284	2187	2187
   q9	8076	7975	7772	7772
   q10	4653	4650	4212	4212
   q11	620	423	391	391
   q12	747	805	545	545
   q13	3291	3602	2969	2969
   q14	287	316	284	284
   q15	q16	700	751	650	650
   q17	1360	1348	1456	1348
   q18	7986	7373	7247	7247
   q19	1190	1124	1121	1121
   q20	2209	2212	1967	1967
   q21	5234	4547	4433	4433
   q22	513	491	406	406
   Total cold run time: 57201 ms
   Total hot run time: 51911 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4484789023

   
   /review
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4506448784

   # BE UT Coverage Report
   Increment line coverage `95.24% (60/63)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/53beb25ff29c516ea44ab10fd952a4e67c6b3443_53beb25ff29c516ea44ab10fd952a4e67c6b3443/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/53beb25ff29c516ea44ab10fd952a4e67c6b3443_53beb25ff29c516ea44ab10fd952a4e67c6b3443/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 53.62% (20724/38653) |
   | Line Coverage     | 37.20% (196165/527396) |
   | Region Coverage   | 33.52% (153768/458693) |
   | Branch Coverage   | 34.53% (66990/193983) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4484789770

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4504936323

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31148 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 53beb25ff29c516ea44ab10fd952a4e67c6b3443, data reload: false
   
   ------ Round 1 ----------------------------------
   orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	17630	4004	3970	3970
   q2	q3	10807	1346	804	804
   q4	4689	474	355	355
   q5	7611	2304	2082	2082
   q6	372	176	139	139
   q7	986	768	653	653
   q8	9519	1711	1588	1588
   q9	7069	4932	4896	4896
   q10	6463	2143	1878	1878
   q11	431	278	256	256
   q12	675	421	297	297
   q13	18146	3381	2837	2837
   q14	270	258	232	232
   q15	q16	820	779	705	705
   q17	903	872	934	872
   q18	6968	5706	5603	5603
   q19	1171	1258	1029	1029
   q20	509	408	273	273
   q21	5609	2635	2377	2377
   q22	437	367	302	302
   Total cold run time: 101085 ms
   Total hot run time: 31148 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	4291	4192	4258	4192
   q2	q3	4490	4928	4292	4292
   q4	2230	2347	1531	1531
   q5	4446	4299	4671	4299
   q6	261	192	154	154
   q7	2068	1835	1722	1722
   q8	2493	2238	2107	2107
   q9	7823	7917	7915	7915
   q10	4578	4489	4167	4167
   q11	637	417	395	395
   q12	753	734	527	527
   q13	3264	3592	2990	2990
   q14	300	307	285	285
   q15	q16	739	776	666	666
   q17	1407	1335	1349	1335
   q18	8117	7478	7039	7039
   q19	1115	1125	1094	1094
   q20	2229	2237	1944	1944
   q21	5414	4947	4821	4821
   q22	535	462	429	429
   Total cold run time: 57190 ms
   Total hot run time: 51904 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4504170548

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4485607552

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 170423 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit e1c075d8590935395827f7920ba612e0d71cb754, data reload: false
   
   query5	4316	677	518	518
   query6	348	220	203	203
   query7	4222	562	317	317
   query8	331	231	227	227
   query9	8815	4029	4028	4028
   query10	441	333	293	293
   query11	5796	2344	2278	2278
   query12	187	127	123	123
   query13	1267	590	442	442
   query14	6061	5389	5092	5092
   query14_1	4395	4483	4376	4376
   query15	217	204	186	186
   query16	996	481	463	463
   query17	1173	733	586	586
   query18	2607	467	345	345
   query19	236	196	166	166
   query20	141	131	138	131
   query21	217	137	118	118
   query22	13777	13601	13590	13590
   query23	17270	16419	16045	16045
   query23_1	16194	16243	16159	16159
   query24	7463	1744	1281	1281
   query24_1	1299	1320	1281	1281
   query25	571	492	428	428
   query26	1317	322	174	174
   query27	2738	567	332	332
   query28	4449	1952	1964	1952
   query29	1006	621	494	494
   query30	305	236	200	200
   query31	1109	1063	955	955
   query32	87	76	73	73
   query33	569	353	297	297
   query34	1175	1155	655	655
   query35	787	809	668	668
   query36	1323	1333	1217	1217
   query37	156	106	86	86
   query38	3242	3136	3068	3068
   query39	929	939	887	887
   query39_1	895	890	870	870
   query40	227	151	124	124
   query41	72	62	60	60
   query42	108	112	108	108
   query43	340	339	291	291
   query44	
   query45	208	207	194	194
   query46	1059	1210	746	746
   query47	2332	2317	2198	2198
   query48	403	436	277	277
   query49	636	475	394	394
   query50	1000	353	262	262
   query51	4389	4326	4287	4287
   query52	109	106	96	96
   query53	250	306	209	209
   query54	311	282	259	259
   query55	94	92	85	85
   query56	311	316	310	310
   query57	1414	1390	1276	1276
   query58	293	270	269	269
   query59	1604	1670	1487	1487
   query60	322	326	319	319
   query61	158	147	157	147
   query62	674	623	562	562
   query63	254	206	207	206
   query64	2411	807	646	646
   query65	
   query66	1681	471	356	356
   query67	30199	30042	29902	29902
   query68	
   query69	504	332	300	300
   query70	1014	1038	957	957
   query71	317	283	271	271
   query72	2913	2710	2479	2479
   query73	843	796	422	422
   query74	5142	4912	4743	4743
   query75	2713	2625	2277	2277
   query76	2297	1167	786	786
   query77	411	423	347	347
   query78	12254	12261	11696	11696
   query79	1254	1012	740	740
   query80	624	587	483	483
   query81	452	283	241	241
   query82	239	158	124	124
   query83	282	288	258	258
   query84	265	145	112	112
   query85	931	620	534	534
   query86	356	353	317	317
   query87	3458	3383	3238	3238
   query88	3564	2700	2684	2684
   query89	427	397	337	337
   query90	2125	197	180	180
   query91	193	187	183	183
   query92	82	72	74	72
   query93	1477	1432	874	874
   query94	508	344	267	267
   query95	673	461	368	368
   query96	1089	812	334	334
   query97	2685	2678	2552	2552
   query98	241	230	232	230
   query99	1103	1110	978	978
   Total cold run time: 252751 ms
   Total hot run time: 170423 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4515748080

   # BE Regression && UT Coverage Report
   Increment line coverage `95.31% (61/64)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_56a256e99da0d555aa5f6e4135eadbebc7587954_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_56a256e99da0d555aa5f6e4135eadbebc7587954_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 63.54% (24074/37886) |
   | Line Coverage     | 47.23% (248644/526466) |
   | Region Coverage   | 44.29% (205232/463392) |
   | Branch Coverage   | 45.47% (88602/194845) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5090010335

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29614 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit e10d7e9ffe771271681707216dfffb5bdb658f7a, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17797	4327	4268	4268
   q2	2014	350	212	212
   q3	10299	1454	828	828
   q4	4681	475	340	340
   q5	7521	859	577	577
   q6	183	173	135	135
   q7	762	830	615	615
   q8	9336	1700	1619	1619
   q9	5713	4419	4337	4337
   q10	6821	1747	1451	1451
   q11	509	344	347	344
   q12	728	569	454	454
   q13	18056	3375	2725	2725
   q14	265	257	240	240
   q15	q16	788	773	708	708
   q17	991	1027	997	997
   q18	7041	5735	5494	5494
   q19	1189	1236	1037	1037
   q20	769	684	586	586
   q21	5610	2612	2347	2347
   q22	429	357	300	300
   Total cold run time: 101502 ms
   Total hot run time: 29614 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4518	4310	4361	4310
   q2	287	314	211	211
   q3	4576	4987	4389	4389
   q4	2041	2153	1357	1357
   q5	4429	4257	4297	4257
   q6	229	172	127	127
   q7	1743	1940	1823	1823
   q8	2600	2230	2185	2185
   q9	7992	8071	7735	7735
   q10	4706	4645	4205	4205
   q11	583	421	415	415
   q12	771	781	545	545
   q13	3339	3676	2998	2998
   q14	295	283	283	283
   q15	q16	690	724	643	643
   q17	1353	1337	1324	1324
   q18	8083	7380	7274	7274
   q19	1181	1141	1091	1091
   q20	2217	2216	1926	1926
   q21	5248	4533	4418	4418
   q22	508	471	412	412
   Total cold run time: 57389 ms
   Total hot run time: 51928 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5126154826

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 25.09 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 5a16b261c953a5253c8e991fc04130734fbb69ea, data reload: false
   
   query1	0.01	0.01	0.01
   query2	0.09	0.05	0.05
   query3	0.26	0.14	0.13
   query4	1.62	0.14	0.14
   query5	0.24	0.23	0.21
   query6	1.26	1.09	1.09
   query7	0.04	0.01	0.00
   query8	0.06	0.04	0.03
   query9	0.37	0.31	0.31
   query10	0.55	0.57	0.58
   query11	0.19	0.13	0.14
   query12	0.19	0.14	0.14
   query13	0.46	0.47	0.47
   query14	1.03	1.03	1.02
   query15	0.62	0.59	0.59
   query16	0.31	0.32	0.31
   query17	1.15	1.12	1.10
   query18	0.21	0.21	0.21
   query19	1.98	1.99	1.94
   query20	0.02	0.01	0.01
   query21	15.44	0.20	0.13
   query22	4.93	0.05	0.05
   query23	16.08	0.29	0.12
   query24	2.93	0.42	0.31
   query25	0.10	0.05	0.04
   query26	0.73	0.22	0.16
   query27	0.04	0.03	0.03
   query28	3.47	0.92	0.57
   query29	12.59	4.16	3.28
   query30	0.29	0.16	0.15
   query31	2.77	0.60	0.30
   query32	3.22	0.59	0.48
   query33	3.33	3.17	3.16
   query34	15.60	4.27	3.56
   query35	3.53	3.49	3.55
   query36	0.54	0.43	0.43
   query37	0.09	0.07	0.06
   query38	0.05	0.04	0.04
   query39	0.03	0.03	0.03
   query40	0.18	0.16	0.15
   query41	0.08	0.04	0.03
   query42	0.04	0.03	0.03
   query43	0.04	0.04	0.03
   Total cold run time: 96.76 s
   Total hot run time: 25.09 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5138819098

   @zhaorongsheng you can check the ai review, and reply it if it is not a real issue.
   Not all issues need to be fixed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #63363:
URL: https://github.com/apache/doris/pull/63363#discussion_r3687585256


##########
be/test/util/dns_cache_test.cpp:
##########
@@ -0,0 +1,592 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "util/dns_cache.h"
+
+#include <gtest/gtest-message.h>
+#include <gtest/gtest-test-part.h>
+
+#include "common/config.h"
+#include "gtest/gtest_pred_impl.h"
+
+namespace doris {
+
+class DNSCacheTest : public testing::Test {
+public:
+    DNSCacheTest() = default;
+    ~DNSCacheTest() override = default;
+
+protected:
+    void SetUp() override {
+        _saved_threshold = config::dns_cache_max_consecutive_failures;
+        _saved_log_every = config::dns_cache_log_every_n_failures;
+        _saved_negative_ttl = config::dns_cache_negative_ttl_seconds;
+    }
+
+    void TearDown() override {
+        config::dns_cache_max_consecutive_failures = _saved_threshold;
+        config::dns_cache_log_every_n_failures = _saved_log_every;
+        config::dns_cache_negative_ttl_seconds = _saved_negative_ttl;
+    }
+
+    // Build a resolver whose failure behaviour can be flipped at runtime.
+    static DNSCache::Resolver make_resolver(bool* should_fail, const std::string& ip = "1.2.3.4") {
+        return [should_fail, ip](const std::string&, std::string& out, bool) -> Status {
+            if (*should_fail) {
+                return Status::InternalError("mock failure");
+            }
+            out = ip;
+            return Status::OK();
+        };
+    }
+
+private:
+    int32_t _saved_threshold = 0;
+    int32_t _saved_log_every = 0;
+    int32_t _saved_negative_ttl = 0;
+};
+
+// ── existing tests ────────────────────────────────────────────────────────────
+
+// Sanity: localhost resolves successfully and is cached.
+TEST_F(DNSCacheTest, resolve_localhost) {
+    DNSCache cache;
+    std::string ip;
+    EXPECT_TRUE(cache.get("localhost", &ip).ok());
+    EXPECT_FALSE(ip.empty());
+    // Second call hits the cache fast path and returns the same IP.
+    std::string ip2;
+    EXPECT_TRUE(cache.get("localhost", &ip2).ok());
+    EXPECT_EQ(ip, ip2);
+    EXPECT_EQ(1u, cache.size_for_test());
+}
+
+// Unresolvable hostname on first access returns InternalError and is NOT cached.
+TEST_F(DNSCacheTest, first_miss_does_not_cache) {
+    DNSCache cache;
+    std::string ip;
+    Status st = cache.get("this-host-does-not-exist.invalid", &ip);
+    EXPECT_FALSE(st.ok());
+    EXPECT_EQ(0u, cache.size_for_test());
+}
+
+// Repeated successful resolution does not grow the cache and does not accumulate
+// any failure state.
+TEST_F(DNSCacheTest, success_keeps_cache_stable) {
+    DNSCache cache;
+    std::string ip;
+    for (int i = 0; i < 8; ++i) {
+        EXPECT_TRUE(cache.get("localhost", &ip).ok());
+    }
+    EXPECT_EQ(1u, cache.size_for_test());
+}
+
+// The eviction config can be disabled by setting threshold <= 0 (legacy behavior).
+// In legacy mode, an unresolvable hostname on first access is still not cached,
+// matching the pre-fix semantics for callers.
+TEST_F(DNSCacheTest, eviction_disabled_when_threshold_zero) {

Review Comment:
   This test never reaches the code controlled by `dns_cache_max_consecutive_failures`: a first miss for a never-cached `.invalid` host fails before `_refresh_once()` reads the threshold, so it would still pass if the `threshold > 0` guard regressed and cached hosts were evicted in the documented legacy mode. Please populate a host with the injected resolver, switch it to failure, run multiple `refresh_for_test()` cycles with the threshold set to zero, and assert that the cached host/IP remains available.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5140372787

   @morningman  would you mind triggering the /review again? thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5131105383

   # BE Regression && UT Coverage Report
   Increment line coverage `95.74% (135/141)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_fa3c0584fe777ad6e6612f65b98ad559ed359f7f_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_fa3c0584fe777ad6e6612f65b98ad559ed359f7f_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 75.72% (31979/42233) |
   | Line Coverage     | 60.34% (356208/590371) |
   | Region Coverage   | 56.91% (298689/524881) |
   | Branch Coverage   | 58.25% (134351/230653) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5114192295

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 30066 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 2f6e6deea902b0ee0201c1cebf6ae52e82167fee, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17681	4360	4250	4250
   q2	2027	339	204	204
   q3	10292	1500	837	837
   q4	4693	483	338	338
   q5	7514	860	576	576
   q6	190	175	135	135
   q7	784	826	615	615
   q8	9317	1711	1577	1577
   q9	5741	4406	4420	4406
   q10	6719	1737	1475	1475
   q11	520	368	320	320
   q12	736	590	458	458
   q13	18077	3435	2765	2765
   q14	278	269	254	254
   q15	q16	797	781	721	721
   q17	1047	1026	1143	1026
   q18	6926	5797	5516	5516
   q19	1183	1339	1085	1085
   q20	808	668	611	611
   q21	5751	2698	2593	2593
   q22	439	359	304	304
   Total cold run time: 101520 ms
   Total hot run time: 30066 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4573	4511	4527	4511
   q2	320	339	217	217
   q3	4597	4995	4400	4400
   q4	2104	2143	1394	1394
   q5	4481	4330	4398	4330
   q6	251	180	130	130
   q7	2189	2066	1645	1645
   q8	2720	2443	2415	2415
   q9	8221	7873	8058	7873
   q10	4674	4656	4238	4238
   q11	610	440	391	391
   q12	789	764	533	533
   q13	3450	3592	2945	2945
   q14	312	318	280	280
   q15	q16	731	733	637	637
   q17	1392	1379	1471	1379
   q18	8266	7473	7411	7411
   q19	1124	1104	1127	1104
   q20	2252	2223	1945	1945
   q21	5361	4707	4441	4441
   q22	541	465	396	396
   Total cold run time: 58958 ms
   Total hot run time: 52615 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514470419

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514651229

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5126037514

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29676 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 5a16b261c953a5253c8e991fc04130734fbb69ea, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17621	4131	4048	4048
   q2	2015	326	210	210
   q3	10287	1435	831	831
   q4	4683	471	338	338
   q5	7501	880	560	560
   q6	195	178	140	140
   q7	776	818	610	610
   q8	9378	1592	1717	1592
   q9	5587	4366	4406	4366
   q10	6775	1769	1487	1487
   q11	513	353	331	331
   q12	717	588	466	466
   q13	18099	3549	2814	2814
   q14	268	263	249	249
   q15	q16	795	787	710	710
   q17	994	885	978	885
   q18	6945	5749	5514	5514
   q19	1195	1278	1128	1128
   q20	832	687	577	577
   q21	5530	2623	2518	2518
   q22	434	364	302	302
   Total cold run time: 101140 ms
   Total hot run time: 29676 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	4419	4347	4314	4314
   q2	289	316	209	209
   q3	4581	5017	4412	4412
   q4	2088	2172	1364	1364
   q5	4462	4276	4307	4276
   q6	240	180	131	131
   q7	1764	1920	1948	1920
   q8	2553	2210	2228	2210
   q9	8167	8148	7969	7969
   q10	4674	4657	4189	4189
   q11	589	454	398	398
   q12	785	749	539	539
   q13	3318	3711	2978	2978
   q14	306	299	268	268
   q15	q16	714	748	642	642
   q17	1405	1377	1307	1307
   q18	8062	7347	7312	7312
   q19	1190	1156	1140	1140
   q20	2248	2233	1961	1961
   q21	5301	4700	4447	4447
   q22	536	456	415	415
   Total cold run time: 57691 ms
   Total hot run time: 52401 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5128852919

   
   run buildall
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5125338068

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5114381709

   # BE UT Coverage Report
   Increment line coverage `98.06% (152/155)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/2f6e6deea902b0ee0201c1cebf6ae52e82167fee_2f6e6deea902b0ee0201c1cebf6ae52e82167fee/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/2f6e6deea902b0ee0201c1cebf6ae52e82167fee_2f6e6deea902b0ee0201c1cebf6ae52e82167fee/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 58.93% (25429/43154) |
   | Line Coverage     | 43.03% (254910/592447) |
   | Region Coverage   | 38.68% (201627/521257) |
   | Branch Coverage   | 39.98% (91650/229248) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5090166090

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 25.21 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit e10d7e9ffe771271681707216dfffb5bdb658f7a, data reload: false
   
   query1	0.01	0.01	0.00
   query2	0.12	0.04	0.05
   query3	0.26	0.14	0.13
   query4	1.61	0.14	0.15
   query5	0.25	0.22	0.23
   query6	1.29	1.08	1.11
   query7	0.04	0.00	0.00
   query8	0.06	0.03	0.03
   query9	0.39	0.34	0.33
   query10	0.54	0.55	0.57
   query11	0.19	0.14	0.14
   query12	0.18	0.14	0.14
   query13	0.48	0.47	0.46
   query14	1.02	1.01	1.01
   query15	0.61	0.59	0.61
   query16	0.33	0.33	0.35
   query17	1.17	1.12	1.16
   query18	0.23	0.21	0.21
   query19	2.08	2.03	1.92
   query20	0.01	0.01	0.01
   query21	15.46	0.22	0.13
   query22	4.80	0.05	0.05
   query23	16.12	0.31	0.12
   query24	2.95	0.42	0.32
   query25	0.10	0.05	0.05
   query26	0.74	0.20	0.16
   query27	0.04	0.05	0.03
   query28	3.48	0.86	0.55
   query29	12.47	4.17	3.33
   query30	0.27	0.16	0.16
   query31	2.77	0.60	0.32
   query32	3.22	0.59	0.49
   query33	3.13	3.32	3.21
   query34	15.83	4.23	3.53
   query35	3.57	3.53	3.54
   query36	0.55	0.44	0.42
   query37	0.09	0.07	0.06
   query38	0.05	0.04	0.03
   query39	0.04	0.03	0.03
   query40	0.19	0.17	0.15
   query41	0.08	0.03	0.03
   query42	0.04	0.03	0.03
   query43	0.05	0.04	0.03
   Total cold run time: 96.91 s
   Total hot run time: 25.21 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5151026427

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4889957622

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4598277458

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514679245

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4485530197

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 31003 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit e1c075d8590935395827f7920ba612e0d71cb754, data reload: false
   
   ------ Round 1 ----------------------------------
   orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	17604	3917	4125	3917
   q2	q3	10773	1449	821	821
   q4	4720	478	358	358
   q5	8304	2269	2110	2110
   q6	381	182	146	146
   q7	989	786	630	630
   q8	9397	1725	1535	1535
   q9	7098	4957	4918	4918
   q10	6463	2196	1825	1825
   q11	427	275	243	243
   q12	642	439	304	304
   q13	18191	3896	2786	2786
   q14	266	258	234	234
   q15	q16	813	769	705	705
   q17	951	1013	954	954
   q18	6895	5906	5455	5455
   q19	1178	1282	1087	1087
   q20	518	414	254	254
   q21	5531	2601	2423	2423
   q22	433	363	298	298
   Total cold run time: 101574 ms
   Total hot run time: 31003 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
   ============================================
   q1	4252	4240	4380	4240
   q2	q3	4528	4929	4334	4334
   q4	2127	2239	1411	1411
   q5	4439	4244	4830	4244
   q6	243	193	142	142
   q7	1931	1837	1661	1661
   q8	2537	2172	2253	2172
   q9	8045	7733	7734	7733
   q10	4645	4504	4111	4111
   q11	658	414	376	376
   q12	747	764	519	519
   q13	3321	3690	2981	2981
   q14	298	313	281	281
   q15	q16	724	738	682	682
   q17	1358	1322	1300	1300
   q18	8150	7238	7117	7117
   q19	1119	1108	1112	1108
   q20	2225	2219	1932	1932
   q21	5373	4670	4577	4577
   q22	521	464	401	401
   Total cold run time: 57241 ms
   Total hot run time: 51322 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4504982148

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 169097 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 53beb25ff29c516ea44ab10fd952a4e67c6b3443, data reload: false
   
   query5	4332	675	514	514
   query6	329	235	196	196
   query7	4242	599	312	312
   query8	325	234	221	221
   query9	8822	4055	4067	4055
   query10	454	339	297	297
   query11	5802	2534	2215	2215
   query12	183	132	128	128
   query13	1338	627	429	429
   query14	5994	5354	5061	5061
   query14_1	4363	4360	4341	4341
   query15	212	200	182	182
   query16	1004	450	424	424
   query17	1117	725	585	585
   query18	2448	493	349	349
   query19	211	205	163	163
   query20	139	130	133	130
   query21	219	139	122	122
   query22	13679	13639	13379	13379
   query23	17374	16385	16113	16113
   query23_1	16163	16212	16220	16212
   query24	7531	1811	1329	1329
   query24_1	1324	1312	1316	1312
   query25	584	497	441	441
   query26	1320	313	181	181
   query27	2690	564	347	347
   query28	4485	1992	1973	1973
   query29	991	672	515	515
   query30	313	237	207	207
   query31	1139	1065	943	943
   query32	90	76	78	76
   query33	550	370	317	317
   query34	1159	1128	661	661
   query35	768	778	709	709
   query36	1327	1324	1204	1204
   query37	161	107	93	93
   query38	3238	3182	3053	3053
   query39	931	919	894	894
   query39_1	886	880	859	859
   query40	235	154	138	138
   query41	72	70	70	70
   query42	118	110	111	110
   query43	327	331	291	291
   query44	
   query45	226	207	200	200
   query46	1082	1227	735	735
   query47	2301	2311	2131	2131
   query48	414	435	299	299
   query49	650	515	397	397
   query50	991	350	254	254
   query51	4388	4290	4261	4261
   query52	109	110	100	100
   query53	255	296	216	216
   query54	329	289	273	273
   query55	96	93	90	90
   query56	327	324	331	324
   query57	1409	1383	1310	1310
   query58	304	274	280	274
   query59	1598	1616	1385	1385
   query60	336	335	328	328
   query61	205	153	148	148
   query62	677	629	553	553
   query63	249	205	202	202
   query64	2381	804	620	620
   query65	
   query66	1712	475	356	356
   query67	29364	30030	29237	29237
   query68	
   query69	448	358	299	299
   query70	1009	1005	1010	1005
   query71	309	276	279	276
   query72	3068	2699	2422	2422
   query73	835	772	433	433
   query74	5102	4919	4726	4726
   query75	2687	2588	2280	2280
   query76	2294	1181	796	796
   query77	411	424	322	322
   query78	12201	12082	11613	11613
   query79	1535	1059	754	754
   query80	1324	538	454	454
   query81	523	278	238	238
   query82	978	156	117	117
   query83	356	283	259	259
   query84	256	183	112	112
   query85	930	527	445	445
   query86	452	350	341	341
   query87	3430	3370	3220	3220
   query88	3617	2684	2662	2662
   query89	453	380	341	341
   query90	1897	198	186	186
   query91	179	172	142	142
   query92	78	77	75	75
   query93	1636	1387	921	921
   query94	748	331	268	268
   query95	664	369	350	350
   query96	1048	765	330	330
   query97	2702	2733	2560	2560
   query98	243	230	227	227
   query99	1149	1104	960	960
   Total cold run time: 253483 ms
   Total hot run time: 169097 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4514976255

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 169218 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 56a256e99da0d555aa5f6e4135eadbebc7587954, data reload: false
   
   query5	4309	648	525	525
   query6	332	228	204	204
   query7	4244	549	313	313
   query8	331	238	222	222
   query9	8810	4015	4053	4015
   query10	443	364	307	307
   query11	5792	2416	2198	2198
   query12	188	132	125	125
   query13	1287	630	426	426
   query14	5981	5427	5044	5044
   query14_1	4370	4353	4402	4353
   query15	207	204	179	179
   query16	978	434	445	434
   query17	942	715	591	591
   query18	2468	484	347	347
   query19	205	191	165	165
   query20	135	130	126	126
   query21	215	141	130	130
   query22	13735	13630	13375	13375
   query23	17156	16314	15984	15984
   query23_1	16156	16021	16158	16021
   query24	7421	1743	1312	1312
   query24_1	1279	1307	1307	1307
   query25	551	485	408	408
   query26	1311	296	173	173
   query27	2718	580	337	337
   query28	4484	1997	1966	1966
   query29	990	614	503	503
   query30	303	237	195	195
   query31	1122	1054	934	934
   query32	99	74	74	74
   query33	540	362	311	311
   query34	1185	1150	656	656
   query35	777	782	676	676
   query36	1323	1382	1229	1229
   query37	159	106	91	91
   query38	3198	3130	3062	3062
   query39	936	920	912	912
   query39_1	876	899	868	868
   query40	218	143	127	127
   query41	66	62	63	62
   query42	116	114	108	108
   query43	321	327	288	288
   query44	
   query45	208	196	196	196
   query46	1093	1178	757	757
   query47	2263	2298	2213	2213
   query48	375	424	293	293
   query49	624	482	376	376
   query50	952	349	247	247
   query51	4307	4284	4166	4166
   query52	105	103	92	92
   query53	252	283	194	194
   query54	305	276	248	248
   query55	93	93	87	87
   query56	294	302	290	290
   query57	1404	1389	1315	1315
   query58	305	271	272	271
   query59	1536	1645	1444	1444
   query60	319	325	308	308
   query61	162	159	158	158
   query62	669	609	558	558
   query63	233	200	203	200
   query64	2427	782	636	636
   query65	
   query66	1718	492	352	352
   query67	29830	29958	29691	29691
   query68	
   query69	465	339	314	314
   query70	1062	1027	999	999
   query71	302	269	273	269
   query72	3229	2920	2555	2555
   query73	872	765	402	402
   query74	5065	4889	4696	4696
   query75	2659	2577	2259	2259
   query76	2285	1129	776	776
   query77	400	407	343	343
   query78	12255	12187	11538	11538
   query79	1436	1071	753	753
   query80	638	554	453	453
   query81	457	277	243	243
   query82	1366	156	119	119
   query83	366	278	257	257
   query84	304	143	110	110
   query85	885	548	454	454
   query86	401	327	359	327
   query87	3393	3390	3181	3181
   query88	3554	2679	2696	2679
   query89	427	376	339	339
   query90	1925	182	183	182
   query91	177	175	140	140
   query92	77	79	70	70
   query93	1532	1442	794	794
   query94	539	361	319	319
   query95	679	482	356	356
   query96	1031	786	364	364
   query97	2685	2682	2522	2522
   query98	244	234	227	227
   query99	1137	1114	956	956
   Total cold run time: 252453 ms
   Total hot run time: 169218 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4891115686

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 172969 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 8e1bac4ce786a9aa15d89c5ac23e4466e645e62c, data reload: false
   
   query5	4324	631	507	507
   query6	466	220	195	195
   query7	4902	557	337	337
   query8	340	183	178	178
   query9	8746	4082	4026	4026
   query10	490	365	296	296
   query11	5913	2370	2159	2159
   query12	154	101	107	101
   query13	1275	605	435	435
   query14	6247	5285	4967	4967
   query14_1	4279	4272	4258	4258
   query15	216	201	178	178
   query16	1023	481	428	428
   query17	1100	701	557	557
   query18	2454	470	334	334
   query19	203	179	139	139
   query20	108	107	104	104
   query21	225	154	134	134
   query22	13666	13646	13323	13323
   query23	17371	16395	16103	16103
   query23_1	16136	16238	16266	16238
   query24	7778	1744	1325	1325
   query24_1	1330	1278	1295	1278
   query25	571	464	398	398
   query26	1346	377	210	210
   query27	2565	609	371	371
   query28	4454	2053	2048	2048
   query29	1121	638	517	517
   query30	346	262	223	223
   query31	1119	1101	981	981
   query32	105	66	62	62
   query33	549	331	265	265
   query34	1164	1109	672	672
   query35	778	784	682	682
   query36	1421	1420	1238	1238
   query37	156	108	94	94
   query38	1880	1705	1679	1679
   query39	934	927	900	900
   query39_1	890	887	883	883
   query40	249	164	148	148
   query41	73	71	69	69
   query42	99	98	94	94
   query43	325	327	291	291
   query44	1458	783	796	783
   query45	201	187	181	181
   query46	1082	1211	796	796
   query47	2357	2302	2237	2237
   query48	415	433	310	310
   query49	611	432	328	328
   query50	1095	437	336	336
   query51	4393	4385	4362	4362
   query52	89	89	77	77
   query53	272	269	211	211
   query54	292	250	224	224
   query55	77	73	68	68
   query56	307	300	295	295
   query57	1436	1405	1338	1338
   query58	295	267	266	266
   query59	1575	1678	1446	1446
   query60	321	275	257	257
   query61	176	201	147	147
   query62	680	632	588	588
   query63	239	214	204	204
   query64	2552	772	608	608
   query65	4872	4687	4758	4687
   query66	1823	507	391	391
   query67	29486	28917	29376	28917
   query68	3262	1576	1012	1012
   query69	418	330	269	269
   query70	1086	973	993	973
   query71	351	320	299	299
   query72	2905	2652	2335	2335
   query73	816	791	416	416
   query74	5099	4942	4747	4747
   query75	2607	2569	2204	2204
   query76	2326	1173	783	783
   query77	341	401	287	287
   query78	12390	12458	11911	11911
   query79	1525	1106	772	772
   query80	1253	535	463	463
   query81	571	322	280	280
   query82	613	157	120	120
   query83	367	312	289	289
   query84	284	158	131	131
   query85	932	625	506	506
   query86	425	278	285	278
   query87	1848	1820	1747	1747
   query88	3727	2820	2798	2798
   query89	459	406	356	356
   query90	1860	197	195	195
   query91	235	189	158	158
   query92	63	61	59	59
   query93	1788	1550	1058	1058
   query94	709	354	282	282
   query95	777	564	475	475
   query96	1042	790	339	339
   query97	2707	2709	2565	2565
   query98	216	203	202	202
   query99	1175	1138	1019	1019
   Total cold run time: 259404 ms
   Total hot run time: 172969 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-4892367072

   # BE Regression && UT Coverage Report
   Increment line coverage `95.77% (68/71)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/63363_8e1bac4ce786a9aa15d89c5ac23e4466e645e62c_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/63363_8e1bac4ce786a9aa15d89c5ac23e4466e645e62c_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 74.62% (29787/39917) |
   | Line Coverage     | 58.68% (326459/556355) |
   | Region Coverage   | 55.59% (274440/493690) |
   | Branch Coverage   | 56.79% (120767/212658) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5119323764

   # BE UT Coverage Report
   Increment line coverage `95.65% (154/161)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/fa74d5033267476a1c0007f123026b3bda4d2e14_fa74d5033267476a1c0007f123026b3bda4d2e14/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/fa74d5033267476a1c0007f123026b3bda4d2e14_fa74d5033267476a1c0007f123026b3bda4d2e14/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 59.06% (25568/43291) |
   | Line Coverage     | 43.15% (256406/594272) |
   | Region Coverage   | 38.84% (203168/523119) |
   | Branch Coverage   | 40.16% (92607/230586) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5126794885

   # BE UT Coverage Report
   Increment line coverage `95.65% (154/161)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/5a16b261c953a5253c8e991fc04130734fbb69ea_5a16b261c953a5253c8e991fc04130734fbb69ea/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/5a16b261c953a5253c8e991fc04130734fbb69ea_5a16b261c953a5253c8e991fc04130734fbb69ea/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 59.07% (25575/43295) |
   | Line Coverage     | 43.16% (256475/594311) |
   | Region Coverage   | 38.84% (203165/523137) |
   | Branch Coverage   | 40.17% (92630/230606) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5126123647

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 178134 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 5a16b261c953a5253c8e991fc04130734fbb69ea, data reload: false
   
   query5	4317	628	475	475
   query6	467	227	206	206
   query7	4861	595	355	355
   query8	337	187	170	170
   query9	8776	4103	4115	4103
   query10	467	353	336	336
   query11	5931	2362	2124	2124
   query12	162	104	101	101
   query13	1272	586	442	442
   query14	6235	5235	5302	5235
   query14_1	4270	4266	4243	4243
   query15	214	207	176	176
   query16	1029	495	479	479
   query17	949	739	592	592
   query18	2442	508	361	361
   query19	234	195	152	152
   query20	115	112	105	105
   query21	237	164	135	135
   query22	13665	13611	13393	13393
   query23	17360	16567	16072	16072
   query23_1	16328	16298	16223	16223
   query24	7510	1750	1255	1255
   query24_1	1296	1269	1261	1261
   query25	523	438	354	354
   query26	1335	362	210	210
   query27	2614	608	387	387
   query28	4494	2050	2036	2036
   query29	1045	615	468	468
   query30	346	269	226	226
   query31	1111	1081	986	986
   query32	98	61	65	61
   query33	517	303	248	248
   query34	1204	1134	638	638
   query35	761	769	658	658
   query36	1038	1009	889	889
   query37	148	111	90	90
   query38	1850	1704	1623	1623
   query39	866	884	870	870
   query39_1	836	836	837	836
   query40	250	171	140	140
   query41	65	64	62	62
   query42	94	91	91	91
   query43	320	325	278	278
   query44	1392	771	767	767
   query45	198	182	174	174
   query46	1118	1203	716	716
   query47	2119	2115	1965	1965
   query48	400	398	300	300
   query49	579	419	309	309
   query50	1039	429	343	343
   query51	11112	11173	10735	10735
   query52	87	89	83	83
   query53	273	287	208	208
   query54	295	252	218	218
   query55	76	70	66	66
   query56	320	298	304	298
   query57	1296	1297	1204	1204
   query58	281	263	262	262
   query59	1590	1665	1442	1442
   query60	305	281	262	262
   query61	162	172	176	172
   query62	551	505	433	433
   query63	246	209	202	202
   query64	2988	1198	988	988
   query65	4758	4661	4657	4657
   query66	1860	568	381	381
   query67	29477	29258	29152	29152
   query68	3214	1495	1009	1009
   query69	428	316	264	264
   query70	954	825	812	812
   query71	366	321	304	304
   query72	3092	2758	2326	2326
   query73	845	798	450	450
   query74	5068	4965	4744	4744
   query75	2531	2497	2145	2145
   query76	2331	1162	753	753
   query77	353	388	288	288
   query78	11943	11913	11358	11358
   query79	1389	1160	725	725
   query80	1300	544	469	469
   query81	522	331	294	294
   query82	639	154	119	119
   query83	370	330	305	305
   query84	330	157	127	127
   query85	961	619	519	519
   query86	411	246	236	236
   query87	1840	1821	1742	1742
   query88	3760	2851	2785	2785
   query89	441	380	335	335
   query90	1957	206	188	188
   query91	207	197	162	162
   query92	63	65	58	58
   query93	1640	1679	1039	1039
   query94	736	359	314	314
   query95	769	625	484	484
   query96	1058	810	355	355
   query97	2605	2599	2508	2508
   query98	213	209	200	200
   query99	1095	1113	975	975
   Total cold run time: 264360 ms
   Total hot run time: 178134 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5130279616

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 24.79 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit fa3c0584fe777ad6e6612f65b98ad559ed359f7f, data reload: false
   
   query1	0.01	0.00	0.01
   query2	0.09	0.04	0.04
   query3	0.25	0.14	0.12
   query4	1.68	0.14	0.13
   query5	0.23	0.22	0.22
   query6	1.17	0.82	0.79
   query7	0.03	0.01	0.00
   query8	0.05	0.04	0.04
   query9	0.39	0.30	0.34
   query10	0.55	0.53	0.56
   query11	0.20	0.14	0.14
   query12	0.18	0.13	0.13
   query13	0.49	0.48	0.47
   query14	1.02	1.00	0.99
   query15	0.62	0.60	0.59
   query16	0.32	0.32	0.32
   query17	1.13	1.13	1.10
   query18	0.22	0.20	0.20
   query19	2.11	1.96	1.98
   query20	0.01	0.01	0.02
   query21	15.44	0.22	0.14
   query22	4.81	0.06	0.05
   query23	16.14	0.31	0.12
   query24	3.16	0.41	0.32
   query25	0.13	0.05	0.04
   query26	0.78	0.20	0.16
   query27	0.05	0.04	0.04
   query28	3.46	0.94	0.56
   query29	12.47	4.18	3.30
   query30	0.27	0.15	0.15
   query31	2.77	0.60	0.32
   query32	3.22	0.59	0.49
   query33	3.16	3.16	3.15
   query34	15.51	4.24	3.54
   query35	3.54	3.54	3.58
   query36	0.56	0.44	0.42
   query37	0.08	0.06	0.07
   query38	0.05	0.04	0.04
   query39	0.04	0.03	0.03
   query40	0.19	0.17	0.15
   query41	0.11	0.03	0.03
   query42	0.04	0.03	0.03
   query43	0.04	0.03	0.04
   Total cold run time: 96.77 s
   Total hot run time: 24.79 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5156600049

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5139917922

   > @zhaorongsheng you can check the ai review, and reply it if it is not a real issue. Not all issues need to be fixed
   
   ok


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5158433872

   run check_coverage


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [fix](dns-cache) evict hostnames that fail to resolve repeatedly [doris]

Posted by "zhaorongsheng (via GitHub)" <gi...@apache.org>.
zhaorongsheng commented on PR #63363:
URL: https://github.com/apache/doris/pull/63363#issuecomment-5087149608

   
   run buildall
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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