Skip to content

branch-3.1: [fix](load)Fix object storage protocol validation to exclude non-S3 compatible services like Azure#58491

Merged
morrySnow merged 1 commit intoapache:branch-3.1from
CalvinKirs:branch-3.1-test
Dec 1, 2025
Merged

branch-3.1: [fix](load)Fix object storage protocol validation to exclude non-S3 compatible services like Azure#58491
morrySnow merged 1 commit intoapache:branch-3.1from
CalvinKirs:branch-3.1-test

Conversation

@CalvinKirs
Copy link
Member

@CalvinKirs CalvinKirs commented Nov 28, 2025

changes

Based on the error message, there's a ClassCastException occurring in the LoadStmt class:

Error: AzureProperties cannot be cast to ObjectStorageProperties

The current LoadStmt.checkS3Param() method has a protocol classification issue:
Over-generalized scope: The method checks all storage types using ObjectStorageProperties
Protocol confusion: Azure is an object storage service but not S3-compatible, so it shouldn't use S3-specific validation logic
Type casting error: As shown in the error, AzureProperties cannot be cast to ObjectStorageProperties

What problem does this PR solve?

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

…ompatible services like Azure

Based on the error message, there's a ClassCastException occurring in the LoadStmt class:
Error: AzureProperties cannot be cast to ObjectStorageProperties
Root Cause: The code assumes all storage properties are instances of ObjectStorageProperties, but AzureProperties doesn't extend this class
Location: In the checkS3Param method where it tries to cast brokerDesc.getStorageProperties() to ObjectStorageProperties
@Thearas
Copy link
Contributor

Thearas commented Nov 28, 2025

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?

@CalvinKirs CalvinKirs changed the title [fix](load)Fix object storage protocol validation to exclude non-S3 compatible services like Azure branch-3.1: [fix](load)Fix object storage protocol validation to exclude non-S3 compatible services like Azure Nov 28, 2025
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/2) 🎉
Increment coverage report
Complete coverage report

@morrySnow morrySnow merged commit 568a258 into apache:branch-3.1 Dec 1, 2025
26 checks passed
seawinde pushed a commit to seawinde/doris that referenced this pull request Jan 30, 2026
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