Repository navigation
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
68 of 87 tasks
u70b3
force-pushed
the
fix-external-db-bypass-n-plus-1
branch
3 times, most recently
from
August 6, 2026 17:54
fe6d568 to
a068067
Compare
u70b3
force-pushed
the
fix-external-db-bypass-n-plus-1
branch
from
August 21, 2026 12:12
a068067 to
7b3f439
Compare
u70b3
force-pushed
the
fix-external-db-bypass-n-plus-1
branch
2 times, most recently
from
September 10, 2026 08:05
ec05ce2 to
27128b3
Compare
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 16936 ms |
Contributor
TPC-DS: Total hot run time: 82953 ms |
Contributor
ClickBench: Total hot run time: 14.97 s |
Contributor
FE Regression Coverage ReportIncrement line coverage |
…de getTables (apache#66025) In the external session-bypass path (e.g. Iceberg REST session=user), ExternalDatabase.getTables() performed 1 + N remote table-name enumerations for N tables: one in getTableNamesWithLock(), then one more per table inside getTableNullableWithoutCache() -> findTableNamePairWithoutCache(). List the remote names once and build every table from that single snapshot instead. The single enumeration still runs the case-insensitive conflict check, so conflicting remote names keep failing the whole listing, and local-name dedup keeps the previous Set + findFirst() first-win semantics.
### What problem does this PR solve? Issue Number: close apache#66025 Problem Summary: The single-enumeration getTables path preserves first-win remote-to-local name mapping and skips individual table build failures. Add focused coverage for both behaviors and clarify that session-aware listings build uncached table objects. ### Release note None ### Check List (For Author) - Test: Unit Test added; not run locally because thirdparty/installed/bin/protoc is unavailable - Behavior changed: No - Does this need documentation: No
u70b3
force-pushed
the
fix-external-db-bypass-n-plus-1
branch
from
September 16, 2026 01:43
27128b3 to
de51ac5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #66025
Problem Summary:
In the external session-bypass path (e.g. Iceberg REST
session=user, where the shared table-name cache is bypassed so one user's visible table set is never served to another),ExternalDatabase.getTables()performs 1 + N remote table-name enumerations for N tables:getTables()callsgetTableNamesWithLock(), which enumerates remote table names once vialistLocalTableNamesWithoutCache(sessionContext).getTableNullable(tblName)per table.getTableNullableWithoutCache(sessionContext, tableName).findTableNamePairWithoutCache(...)— a fulllistTableNames(sessionContext)scan per table.Listing N tables therefore triggers 1 + N remote
LIST TABLEScalls, which is very slow against a remote catalog with many tables.Fix: in the bypass branch, enumerate once via
listTableNames(sessionContext)and build every table from that single snapshot. Semantics are preserved:listTableNames, so conflicting remote names keep failing the whole listing (pinned by a new test).Set+findFirst()first-win semantics when two remote names map to the same local name.Verification: a unit test counting remote listings shows 4 enumerations for 3 tables before the fix and exactly 1 after.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)