w41ter commented on code in PR #38388:
URL: https://github.com/apache/doris/pull/38388#discussion_r1697833036
##########
gensrc/proto/cloud.proto:
##########
@@ -142,6 +142,7 @@ message NodeInfoPB {
UNKNOWN = 0;
FE_MASTER = 1;
FE_OBSERVER = 2;
+ FE_FOLLOWER = 3;
Review Comment:
How about changing `FE_MASTER` to `FE_FOLLOWER`, to make it more consistent
with the local mode?
##########
fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java:
##########
@@ -285,16 +285,24 @@ public synchronized void updateFrontends(List<Frontend>
toAdd, List<Frontend> to
if (masterIp.equals(fe.getHost())) {
continue;
}
- Env.getCurrentEnv().addFrontend(FrontendNodeType.OBSERVER,
- fe.getHost(), fe.getEditLogPort(), fe.getNodeName());
- LOG.info("added cloud frontend={} ", fe);
+ try {
+ Env.getCurrentEnv().addFrontend(fe.getRole(),
+ fe.getHost(), fe.getEditLogPort(), fe.getNodeName());
+ LOG.info("added cloud frontend={} ", fe);
+ } catch (DdlException e) {
+ LOG.warn("failed to add cloud frontend={} ", fe);
+ }
}
for (Frontend fe : toDel) {
if (masterIp.equals(fe.getHost())) {
continue;
}
- Env.getCurrentEnv().dropFrontend(FrontendNodeType.OBSERVER,
fe.getHost(), fe.getEditLogPort());
- LOG.info("dropped cloud frontend={} ", fe);
+ try {
+ Env.getCurrentEnv().dropFrontend(fe.getRole(), fe.getHost(),
fe.getEditLogPort());
Review Comment:
Delete first and then add, otherwise the cluster surviving nodes may not be
able to form a majority.
--
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]