Skip to content

Conversation

@xiaochen-zhou
Copy link
Contributor

Purpose of this pull request

The current logic is to randomly select a FE node to connect to, and if it fails, Doris is considered unavailable. We should optimize this by continuously retrying all user-configured FE nodes.

Does this PR introduce any user-facing change?

no

How was this patch tested?

exist tests

Check list

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

We should make sure the random and ha be supported at the same time. Random pick the address which can be connected.

@xiaochen-zhou
Copy link
Contributor Author

xiaochen-zhou commented Dec 17, 2024

We should make sure the random and ha be supported at the same time. Random pick the address which can be connected.

OK, I will modify it according to this idea later

@xiaochen-zhou
Copy link
Contributor Author

We should make sure the random and ha be supported at the same time. Random pick the address which can be connected.

done.

Comment on lines 305 to 310
} catch (DorisConnectorException e) {
if (i == feNodesNum - 1) {
throw new DorisConnectorException(
DorisConnectorErrorCode.REST_SERVICE_FAILED, e);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can we sure the exception is must cause by FE unavailable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we sure the exception is must cause by FE unavailable?

I updated the code to catch other potential exceptions.

Copy link
Member

@Carl-Zhou-CN Carl-Zhou-CN left a comment

Choose a reason for hiding this comment

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

+1

@Hisoka-X Hisoka-X removed the discuss label Dec 18, 2024
@Hisoka-X Hisoka-X merged commit 3e86102 into apache:dev Dec 18, 2024
4 checks passed
@xiaochen-zhou xiaochen-zhou deleted the doris_fe_ha branch February 15, 2025 04:05
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.

3 participants