这是indexloc提供的服务,不要输入任何密码
Skip to content

Analyze v1.2.11 #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zhangzhefang-github
Copy link

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Which issues of this PR fixes :

Fixes #438

Problem Summary(Required) :

问题描述

在Docker环境中使用StarRocks Flink连接器时,当配置 'load-url' = 'starrocks:8030' 时,StarRocks FE会将Stream Load请求重定向到 127.0.0.1:8040(BE节点),但这个地址在容器间网络中无法访问,导致连接失败。

触发场景

  • Docker/容器化环境部署
  • 使用StarRocks官方推荐的单一FE地址配置
  • Stream Load操作时FE重定向到BE节点

解决方案

  1. 新增ContainerAwareRedirectStrategy类:实现容器感知的HTTP重定向处理
  2. 自动地址转换:将localhost/127.0.0.1重定向自动转换为原始容器主机名
  3. 多节点支持:支持多BE节点的端口到主机名映射
  4. 向后兼容:保持现有非容器环境的正常工作

主要修改

  • ContainerAwareRedirectStrategy.java - 核心重定向策略实现
  • DefaultStreamLoader.java - 集成新的重定向策略
  • TransactionStreamLoader.java - 集成新的重定向策略
  • ContainerAwareRedirectStrategyTest.java - 完整的单元测试覆盖

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
  • I have added documentation for my new feature or new function

banmoy and others added 2 commits May 28, 2025 16:51
Signed-off-by: PengFei Li <lpengfei2016@gmail.com>
- 新增ContainerAwareRedirectStrategy类处理容器环境重定向
- 修复StarRocks FE重定向到localhost/127.0.0.1时无法访问的问题
- 支持多BE节点的端口到主机名映射
- 添加完整的单元测试覆盖(5个测试用例)
- 保持向后兼容性,不影响正常重定向流程

解决Issues: Docker环境中使用'load-url'='starrocks:8030'时连接127.0.0.1:8040失败
测试验证: 所有单元测试通过,编译检查通过

Signed-off-by: zhangzhefang <zhangzhefang@msn.cn>
@zhangzhefang-github
Copy link
Author

Hi, all checks have passed.
Could a maintainer please approve the workflow so this PR can proceed? Thanks in advance!

@CLAassistant
Copy link

CLAassistant commented Jun 24, 2025

CLA assistant check
All committers have signed the CLA.

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.

[Bug] Stream Load connection redirect to 127.0.0.1:8040 fails in Docker environment
3 participants