Skip to content

Conversation

@vinlee19
Copy link
Contributor

What problem does this PR solve?

When max_meta_object_cache_num = 0, the desc command fails because it tries to access disabled meta cache.

Error reproduction:

When use_meta_cache = true (shown in catalog properties), executing desc t_ts_ntz; fails with:

ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'

When use_meta_cache = false is explicitly set, the same desc t_ts_ntz; command works correctly

Solution

  • Force disable use_meta_cache when max_meta_object_cache_num = 0
  • Add validation for invalid configuration values
  • Add warning logs when cache settings are adjusted
  • Improve code readability

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

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

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

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

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

@hello-stephen
Copy link
Contributor

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

Please clearly describe your PR:

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

@vinlee19
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17637	5248	5066	5066
q2	1999	312	214	214
q3	10270	1261	714	714
q4	10234	1016	526	526
q5	7519	2398	2366	2366
q6	185	168	141	141
q7	915	762	647	647
q8	9361	1396	1161	1161
q9	6799	5182	5126	5126
q10	6940	2375	1969	1969
q11	492	297	276	276
q12	355	378	248	248
q13	17779	3649	3001	3001
q14	246	242	219	219
q15	572	514	491	491
q16	433	437	395	395
q17	600	847	368	368
q18	7353	7070	7121	7070
q19	1323	973	559	559
q20	363	349	240	240
q21	3948	2579	2361	2361
q22	1058	1037	979	979
Total cold run time: 106381 ms
Total hot run time: 34137 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5216	5063	5105	5063
q2	251	340	227	227
q3	2220	2676	2273	2273
q4	1387	1770	1340	1340
q5	4229	4264	4609	4264
q6	221	179	136	136
q7	2039	1986	1878	1878
q8	2687	2607	2713	2607
q9	7448	7249	7351	7249
q10	3133	3293	2865	2865
q11	590	498	528	498
q12	713	762	667	667
q13	3752	3852	3234	3234
q14	289	323	282	282
q15	530	497	488	488
q16	465	524	487	487
q17	1297	1610	1336	1336
q18	8001	7563	7594	7563
q19	831	828	1023	828
q20	1976	2007	1961	1961
q21	5120	4485	4336	4336
q22	1085	1041	1000	1000
Total cold run time: 53480 ms
Total hot run time: 50582 ms

@doris-robot
Copy link

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

query1	1045	433	435	433
query2	6561	1794	1721	1721
query3	6776	235	227	227
query4	26288	23439	22806	22806
query5	4455	675	512	512
query6	352	262	237	237
query7	4653	538	318	318
query8	306	256	265	256
query9	8625	2926	2892	2892
query10	505	333	307	307
query11	15859	15011	15350	15011
query12	187	125	127	125
query13	1683	593	444	444
query14	9752	5896	5961	5896
query15	263	207	174	174
query16	7606	658	490	490
query17	1226	737	624	624
query18	2045	423	332	332
query19	203	207	170	170
query20	133	127	129	127
query21	218	136	111	111
query22	4032	4315	4116	4116
query23	33879	33017	32846	32846
query24	8179	2418	2387	2387
query25	578	520	452	452
query26	1243	281	169	169
query27	2724	539	349	349
query28	4322	2257	2228	2228
query29	779	611	509	509
query30	292	236	195	195
query31	939	796	766	766
query32	92	87	83	83
query33	571	396	363	363
query34	799	845	521	521
query35	847	835	764	764
query36	976	1011	930	930
query37	129	114	97	97
query38	4025	4062	3957	3957
query39	1643	1455	1450	1450
query40	230	139	130	130
query41	88	84	64	64
query42	130	118	116	116
query43	515	548	505	505
query44	1344	859	868	859
query45	181	179	174	174
query46	908	1019	661	661
query47	1806	1827	1746	1746
query48	420	431	363	363
query49	750	538	440	440
query50	657	704	419	419
query51	4133	4207	4090	4090
query52	120	118	111	111
query53	256	276	213	213
query54	635	620	567	567
query55	100	95	98	95
query56	393	332	317	317
query57	1194	1205	1161	1161
query58	293	283	278	278
query59	2743	2788	2555	2555
query60	376	357	350	350
query61	170	164	163	163
query62	798	754	697	697
query63	243	203	196	196
query64	4452	1124	822	822
query65	4283	4184	4244	4184
query66	1102	454	340	340
query67	15433	15304	15378	15304
query68	8669	944	601	601
query69	489	342	297	297
query70	1225	1187	1192	1187
query71	502	348	324	324
query72	6021	4906	5075	4906
query73	747	634	368	368
query74	8874	9046	8844	8844
query75	4094	3127	2662	2662
query76	3762	1260	757	757
query77	816	419	346	346
query78	9684	9955	8780	8780
query79	2111	860	618	618
query80	656	610	531	531
query81	484	260	232	232
query82	459	155	116	116
query83	275	279	265	265
query84	264	117	98	98
query85	891	469	427	427
query86	352	343	311	311
query87	4239	4342	4178	4178
query88	3147	2243	2240	2240
query89	391	382	309	309
query90	1982	231	231	231
query91	161	173	135	135
query92	90	76	73	73
query93	1222	989	666	666
query94	715	413	337	337
query95	424	332	325	325
query96	496	584	283	283
query97	2598	2688	2597	2597
query98	252	218	226	218
query99	1601	1437	1299	1299
Total cold run time: 276236 ms
Total hot run time: 186876 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.06	0.06
query3	0.27	0.07	0.08
query4	1.60	0.12	0.12
query5	0.45	0.43	0.43
query6	1.18	0.65	0.66
query7	0.03	0.03	0.02
query8	0.05	0.04	0.05
query9	0.60	0.54	0.53
query10	0.58	0.58	0.57
query11	0.17	0.12	0.12
query12	0.16	0.12	0.12
query13	0.65	0.64	0.62
query14	0.80	0.86	0.84
query15	0.87	0.86	0.87
query16	0.39	0.44	0.39
query17	1.08	1.07	1.04
query18	0.22	0.20	0.20
query19	1.99	1.81	1.81
query20	0.02	0.01	0.02
query21	15.41	0.93	0.58
query22	0.76	1.11	0.81
query23	14.86	1.40	0.65
query24	6.58	1.45	0.50
query25	0.49	0.21	0.20
query26	0.63	0.16	0.13
query27	0.06	0.06	0.05
query28	9.86	0.96	0.45
query29	12.65	3.95	3.25
query30	3.10	3.07	2.98
query31	2.84	0.58	0.39
query32	3.24	0.55	0.47
query33	3.04	3.06	3.10
query34	16.00	5.47	4.86
query35	4.94	4.99	4.94
query36	0.70	0.53	0.49
query37	0.10	0.07	0.08
query38	0.06	0.05	0.05
query39	0.04	0.03	0.03
query40	0.19	0.16	0.14
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 106.97 s
Total hot run time: 32.74 s

Copy link
Contributor

@suxiaogang223 suxiaogang223 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@vinlee19
Copy link
Contributor Author

run cloud_p0

1 similar comment
@vinlee19
Copy link
Contributor Author

run cloud_p0

@morningman morningman closed this Nov 5, 2025
morningman added a commit that referenced this pull request Nov 7, 2025
### What problem does this PR solve?

1.
Issue Number: close #55426

When `max_meta_object_cache_num = 0`, the desc command fails because it
tries to access disabled meta cache.
```
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'
```

So force set `max_meta_object_cache_num` > 0

2.
Remove the removalListener of ExternalDatabase's meta cache, it may
cause thread pool exausted:

```
"CommonRefreshExecutor-55" #19386 daemon prio=5 os_prio=0 tid=0x00007ef928005000 nid=0x61aa waiting on condition [0x00007ef8aaf5a000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00007f03c435af50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:385)
    at org.apache.doris.common.ThreadPoolManager$BlockedPolicy.rejectedExecution(ThreadPoolManager.java:347)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:333)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.removeNode(BoundedLocalCache.java:1882)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.clear(BoundedLocalCache.java:1819)
    at com.github.benmanes.caffeine.cache.LocalManualCache.invalidateAll(LocalManualCache.java:150)
    at org.apache.doris.datasource.metacache.MetaCache.invalidateAll(MetaCache.java:121)
    at org.apache.doris.datasource.ExternalDatabase.setUnInitialized(ExternalDatabase.java:123)
    at org.apache.doris.datasource.ExternalCatalog.lambda$null$2(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$3280/1787323570.accept(Unknown Source)
    at java.util.Optional.ifPresent(Optional.java:159)
    at org.apache.doris.datasource.ExternalCatalog.lambda$makeSureInitialized$3(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$2317/2029647164.onRemoval(Unknown Source)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:327)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache$$Lambda$3279/2010922194.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
```
github-actions bot pushed a commit that referenced this pull request Nov 7, 2025
### What problem does this PR solve?

1.
Issue Number: close #55426

When `max_meta_object_cache_num = 0`, the desc command fails because it
tries to access disabled meta cache.
```
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'
```

So force set `max_meta_object_cache_num` > 0

2.
Remove the removalListener of ExternalDatabase's meta cache, it may
cause thread pool exausted:

```
"CommonRefreshExecutor-55" #19386 daemon prio=5 os_prio=0 tid=0x00007ef928005000 nid=0x61aa waiting on condition [0x00007ef8aaf5a000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00007f03c435af50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:385)
    at org.apache.doris.common.ThreadPoolManager$BlockedPolicy.rejectedExecution(ThreadPoolManager.java:347)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:333)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.removeNode(BoundedLocalCache.java:1882)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.clear(BoundedLocalCache.java:1819)
    at com.github.benmanes.caffeine.cache.LocalManualCache.invalidateAll(LocalManualCache.java:150)
    at org.apache.doris.datasource.metacache.MetaCache.invalidateAll(MetaCache.java:121)
    at org.apache.doris.datasource.ExternalDatabase.setUnInitialized(ExternalDatabase.java:123)
    at org.apache.doris.datasource.ExternalCatalog.lambda$null$2(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$3280/1787323570.accept(Unknown Source)
    at java.util.Optional.ifPresent(Optional.java:159)
    at org.apache.doris.datasource.ExternalCatalog.lambda$makeSureInitialized$3(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$2317/2029647164.onRemoval(Unknown Source)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:327)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache$$Lambda$3279/2010922194.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
```
github-actions bot pushed a commit that referenced this pull request Nov 7, 2025
### What problem does this PR solve?

1.
Issue Number: close #55426

When `max_meta_object_cache_num = 0`, the desc command fails because it
tries to access disabled meta cache.
```
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'
```

So force set `max_meta_object_cache_num` > 0

2.
Remove the removalListener of ExternalDatabase's meta cache, it may
cause thread pool exausted:

```
"CommonRefreshExecutor-55" #19386 daemon prio=5 os_prio=0 tid=0x00007ef928005000 nid=0x61aa waiting on condition [0x00007ef8aaf5a000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00007f03c435af50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:385)
    at org.apache.doris.common.ThreadPoolManager$BlockedPolicy.rejectedExecution(ThreadPoolManager.java:347)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:333)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.removeNode(BoundedLocalCache.java:1882)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.clear(BoundedLocalCache.java:1819)
    at com.github.benmanes.caffeine.cache.LocalManualCache.invalidateAll(LocalManualCache.java:150)
    at org.apache.doris.datasource.metacache.MetaCache.invalidateAll(MetaCache.java:121)
    at org.apache.doris.datasource.ExternalDatabase.setUnInitialized(ExternalDatabase.java:123)
    at org.apache.doris.datasource.ExternalCatalog.lambda$null$2(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$3280/1787323570.accept(Unknown Source)
    at java.util.Optional.ifPresent(Optional.java:159)
    at org.apache.doris.datasource.ExternalCatalog.lambda$makeSureInitialized$3(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$2317/2029647164.onRemoval(Unknown Source)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:327)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache$$Lambda$3279/2010922194.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
```
CalvinKirs pushed a commit to CalvinKirs/incubator-doris that referenced this pull request Nov 7, 2025
### What problem does this PR solve?

1.
Issue Number: close apache#55426

When `max_meta_object_cache_num = 0`, the desc command fails because it
tries to access disabled meta cache.
```
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'
```

So force set `max_meta_object_cache_num` > 0

2.
Remove the removalListener of ExternalDatabase's meta cache, it may
cause thread pool exausted:

```
"CommonRefreshExecutor-55" apache#19386 daemon prio=5 os_prio=0 tid=0x00007ef928005000 nid=0x61aa waiting on condition [0x00007ef8aaf5a000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00007f03c435af50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:385)
    at org.apache.doris.common.ThreadPoolManager$BlockedPolicy.rejectedExecution(ThreadPoolManager.java:347)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:333)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.removeNode(BoundedLocalCache.java:1882)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.clear(BoundedLocalCache.java:1819)
    at com.github.benmanes.caffeine.cache.LocalManualCache.invalidateAll(LocalManualCache.java:150)
    at org.apache.doris.datasource.metacache.MetaCache.invalidateAll(MetaCache.java:121)
    at org.apache.doris.datasource.ExternalDatabase.setUnInitialized(ExternalDatabase.java:123)
    at org.apache.doris.datasource.ExternalCatalog.lambda$null$2(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$3280/1787323570.accept(Unknown Source)
    at java.util.Optional.ifPresent(Optional.java:159)
    at org.apache.doris.datasource.ExternalCatalog.lambda$makeSureInitialized$3(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$2317/2029647164.onRemoval(Unknown Source)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:327)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache$$Lambda$3279/2010922194.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
```
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 18, 2025
### What problem does this PR solve?

1.
Issue Number: close apache#55426

When `max_meta_object_cache_num = 0`, the desc command fails because it
tries to access disabled meta cache.
```
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'
```

So force set `max_meta_object_cache_num` > 0

2.
Remove the removalListener of ExternalDatabase's meta cache, it may
cause thread pool exausted:

```
"CommonRefreshExecutor-55" apache#19386 daemon prio=5 os_prio=0 tid=0x00007ef928005000 nid=0x61aa waiting on condition [0x00007ef8aaf5a000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00007f03c435af50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:385)
    at org.apache.doris.common.ThreadPoolManager$BlockedPolicy.rejectedExecution(ThreadPoolManager.java:347)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:333)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.removeNode(BoundedLocalCache.java:1882)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.clear(BoundedLocalCache.java:1819)
    at com.github.benmanes.caffeine.cache.LocalManualCache.invalidateAll(LocalManualCache.java:150)
    at org.apache.doris.datasource.metacache.MetaCache.invalidateAll(MetaCache.java:121)
    at org.apache.doris.datasource.ExternalDatabase.setUnInitialized(ExternalDatabase.java:123)
    at org.apache.doris.datasource.ExternalCatalog.lambda$null$2(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$3280/1787323570.accept(Unknown Source)
    at java.util.Optional.ifPresent(Optional.java:159)
    at org.apache.doris.datasource.ExternalCatalog.lambda$makeSureInitialized$3(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$2317/2029647164.onRemoval(Unknown Source)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:327)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache$$Lambda$3279/2010922194.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
```
liaoxin01 pushed a commit to liaoxin01/doris that referenced this pull request Feb 9, 2026
1.
Issue Number: close apache#55426

When `max_meta_object_cache_num = 0`, the desc command fails because it
tries to access disabled meta cache.
```
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown table '7311664922056505694'
```

So force set `max_meta_object_cache_num` > 0

2.
Remove the removalListener of ExternalDatabase's meta cache, it may
cause thread pool exausted:

```
"CommonRefreshExecutor-55" apache#19386 daemon prio=5 os_prio=0 tid=0x00007ef928005000 nid=0x61aa waiting on condition [0x00007ef8aaf5a000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00007f03c435af50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:385)
    at org.apache.doris.common.ThreadPoolManager$BlockedPolicy.rejectedExecution(ThreadPoolManager.java:347)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:333)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.removeNode(BoundedLocalCache.java:1882)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.clear(BoundedLocalCache.java:1819)
    at com.github.benmanes.caffeine.cache.LocalManualCache.invalidateAll(LocalManualCache.java:150)
    at org.apache.doris.datasource.metacache.MetaCache.invalidateAll(MetaCache.java:121)
    at org.apache.doris.datasource.ExternalDatabase.setUnInitialized(ExternalDatabase.java:123)
    at org.apache.doris.datasource.ExternalCatalog.lambda$null$2(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$3280/1787323570.accept(Unknown Source)
    at java.util.Optional.ifPresent(Optional.java:159)
    at org.apache.doris.datasource.ExternalCatalog.lambda$makeSureInitialized$3(ExternalCatalog.java:248)
    at org.apache.doris.datasource.ExternalCatalog$$Lambda$2317/2029647164.onRemoval(Unknown Source)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:327)
    at com.github.benmanes.caffeine.cache.BoundedLocalCache$$Lambda$3279/2010922194.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants