github-actions[bot] commented on code in PR #65126:
URL: https://github.com/apache/doris/pull/65126#discussion_r3679433785
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/MetaCacheEntry.java:
##########
@@ -205,65 +372,247 @@ public MetaCacheEntryStats stats() {
lastError.get());
}
- // Read the config dynamically so existing cache entries follow runtime
config updates.
- private boolean isManualMissLoadEnabled() {
- return Config.enable_external_meta_cache_manual_miss_load;
- }
-
// Execute slow miss loads outside Caffeine's sync load path and suppress
stale write-back after invalidation.
- private V getWithManualLoad(K key, Function<K, V> loadFunction) {
+ private V getWithManualLoad(K key, Function<K, V> loadFunction,
+ @Nullable BiPredicate<K, V> currentValueActionRequired,
+ @Nullable BiConsumer<K, V> currentValueAction) {
if (!effectiveEnabled) {
- // Bypass cache entirely when the entry is disabled so manual miss
load does not relax disable semantics.
- return loadAndTrack(key, loadFunction);
+ if (currentValueAction == null) {
+ // Preserve the ordinary disabled-entry path without adding
publication coordination.
+ return loadAndTrack(key, loadFunction);
+ }
+ // Bypass object publication when disabled, but still fence an
auxiliary-index update against invalidation.
+ StripeState state = stripeState(key);
+ long generation;
+ synchronized (state) {
+ generation = generationOf(state);
+ }
+ V loaded = loadAndTrack(key, loadFunction);
+ if (loaded == null) {
+ return loaded;
+ }
+ beforeCurrentValueActionForTest(key, loaded);
+ synchronized (state) {
+ if (generation == generationOf(state)
Review Comment:
**[P2] Keep unrelated stripe collisions from dropping ID navigation**
`generation` belongs to the shared stripe rather than to `key`, so
invalidating any other key in that stripe while this load is in flight makes
this condition false. The lookup still returns its loaded database/table
object, but `ExternalCatalog`/`ExternalDatabase` use `currentValueAction` to
publish `dbIdToName`/`tableIdToName`; their subsequent by-ID getters then
return null. This is not limited to contrived keys: every pair assigned to the
same one of 256 stripes has this behavior (`"Aa"` and `"BB"` are a
deterministic test pair), and TTL-0 object caches cannot repair it through a
retained object entry. Please track rejection at exact-key granularity, or
otherwise allow A's auxiliary publication when only B changed, and add
enabled/TTL-0 collision tests.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/DropTableEvent.java:
##########
@@ -64,6 +65,10 @@ public static List<MetastoreEvent>
getEvents(NotificationEvent event,
return Lists.newArrayList(new DropTableEvent(event, catalogName));
}
+ private static String normalizeTableName(String tableName) {
+ return tableName.toLowerCase(Locale.ROOT);
Review Comment:
**[P1] Preserve the mode-2 table key for TTL-0 drop cleanup**
This lower-cases the only remote table spelling carried by the event before
the new cache-only cleanup runs. With `lower_case_table_names=2` and global
metadata TTL 0, a query can use transient database/table objects while a
per-engine override keeps an entry cached under `NameMapping.localTblName ==
"MixedTbl"`. The later DROP gets a fresh transient database with no
names/object/ID state; `canonicalLocalTableNameFromRemote()` preserves its
input in mode 2, so `mixedtbl` reaches exact engine-cache invalidation and
cannot remove `MixedTbl`. Please keep the original message spelling (or retain
another cache-independent canonical key) through cleanup, and add a mode-2 test
with TTL 0 plus an enabled engine entry.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]