Gabriel39 opened a new pull request, #69720:
URL: https://github.com/apache/doris/pull/69720
### What problem does this PR solve?
Related PR: #69501
`external_table_p0/hive/test_hive_external_lookup_refresh.groovy` can fail
in a multi-FE cluster depending on which FE serves the regression connection.
`SHOW TABLES` and `DESC` populate the target catalog's lookup caches on the
connected follower only. After the remote table is dropped through a separate
catalog, `REFRESH TABLE` is forwarded to the master. If the master's target
table cache is cold, the old implementation tries to load the now-deleted table
and reports that it does not exist before invalidating caches or writing a
refresh journal. The follower therefore retains stale table membership and the
suite stops at `REFRESH TABLE`.
Use the cached local table identity when available, then apply the existing
name-based refresh replay path on the master and record the same invalidation
for other FEs. A remote table object is no longer required just to invalidate
stale metadata. Catalog/database validation and the command's privilege checks
remain in place.
Coverage includes:
- A cold master and a warm follower, with `lower_case_table_names` set to 0,
1, and 2; serialized refresh logs; follower table-name, object, and ID cache
eviction; and table recreation.
- A regression suite that warms a non-master FE, issues refreshes through
both master and non-master connections, checks all live FEs, repeats refresh
after deletion, and verifies the recreated schema. The suite also runs on a
single FE.
### Release note
Fix external table refresh failures when a dropped table is cached on a
follower but absent from the master's cache. `REFRESH TABLE` now accepts an
absent table name in an existing external database as a cache invalidation
request, so success does not depend on which FE retains an old table object.
### Check List (For Author)
- Test
- [x] Regression test
- [x] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- Behavior changed:
- [x] Yes. An absent table name in an existing external database can be
explicitly refreshed to evict stale metadata on other FEs.
- Does this need documentation?
- [x] No.
### Validation
- The new parameterized unit test fails on the original implementation for
all three case modes with the same missing-table error.
- 84 tests passed across `RefreshManagerTest`, `RefreshTableTest`,
`PluginDrivenMissingTableTest`, and `ExternalDatabaseTest`.
- FE Checkstyle passed across all 72 modules in the test reactor.
- The new Groovy suite compiles.
- On a two-FE cluster with Hive 3 Metastore, both the original failing suite
and the new multi-FE suite pass when the regression runner connects to the
non-master FE. The original suite also passed with a master connection. The new
suite issues refreshes through both FEs and checks cache visibility on each FE.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]