gnehil opened a new pull request, #655:
URL: https://github.com/apache/doris-flink-connector/pull/655
# Proposed changes
Issue Number: close #xxx
## Problem Summary:
In cloud mode, when FE redirect is not used and `benodes` is not configured,
the connector discovers backends through the normal backend API. That API
returns alive BE nodes
across all clusters / compute groups.
As a result, stream load may be sent to any BE in the global backend list
instead of only the BE nodes that belong to the target compute group. This can
cause stream load
requests to be routed to the wrong compute group.
This PR makes backend discovery compute-group aware:
- Read the target compute group from stream load properties:
- `compute_group`
- fallback to legacy `cloud_cluster`
- When a target compute group is configured, discover backends from
`/rest/v2/manager/node/backends`.
- Parse backend tags and keep only alive BE nodes whose
`compute_group_name` or `cloud_cluster_name` matches the target group.
- Keep existing behavior when:
- `benodes` is explicitly configured
- FE redirect is enabled
- no compute group is configured
- Centralize this logic in `BackendUtil` and reuse it in writer, batch
stream load, and committer paths.
## Checklist(Required)
1. Does it affect the original behavior: (Yes/No/I Don't know)
2. Has unit tests been added: (Yes/No/No Need)
3. Has document been added or modified: (Yes/No/No Need)
4. Does it need to update dependencies: (Yes/No)
5. Are there any changes that cannot be rolled back: (Yes/No)
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
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]