Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #59928

### What problem does this PR solve?

Related: #54304

Problem Summary:

Before this change, when a JDBC driver was not found in the new default
directory, the code would fallback to the old directory unconditionally,
even if the driver didn't exist there. In cloud mode, it would try to
download from cloud but then fallback to old directory regardless of
download result.

This commit improves the driver lookup logic:
1. Check new default directory first (DORIS_HOME/plugins/jdbc_drivers)
2. Check old default directory (DORIS_HOME/jdbc_drivers)
3. In cloud mode, only download from cloud if not found in either
directory
4. Return error immediately if driver not found (instead of fallback)

This avoids unnecessary cloud downloads when driver exists in old path,
and provides clearer error messages when driver is truly missing.

Changes:
- BE: vjdbc_connector.cpp - check old path before cloud download
- FE: JdbcResource.java - check old path and improve error messages
@github-actions github-actions bot requested a review from yiguolei as a code owner January 19, 2026 14:35
@Thearas
Copy link
Contributor

Thearas commented Jan 19, 2026

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?

@dataroaring dataroaring reopened this Jan 19, 2026
@morningman
Copy link
Contributor

LGTM

@Thearas
Copy link
Contributor

Thearas commented Jan 19, 2026

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 66.67% (4/6) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.72% (18889/35830)
Line Coverage 35.82% (175310/489388)
Region Coverage 32.50% (135747/417623)
Branch Coverage 33.32% (58785/176400)

@yiguolei
Copy link
Contributor

skip buildall

@yiguolei yiguolei merged commit 0e53575 into branch-4.0 Jan 20, 2026
27 of 29 checks passed
@github-actions github-actions bot deleted the auto-pick-59928-branch-4.0 branch January 20, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants