You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhenyue-xu (via GitHub)" <gi...@apache.org> on 2025/08/04 03:43:50 UTC

[PR] [improve]improve FE node failover logging for better observability [seatunnel]

zhenyue-xu opened a new pull request, #9657:
URL: https://github.com/apache/seatunnel/pull/9657

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   -->
   
   ### Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   This pull request improves the FE node failover logging in Doris connector to enhance observability during connection failures. When multiple FE nodes are configured, the system now provides clear progress information when trying each node and explicit error messages when all nodes are exhausted.
   
   ### Does this PR introduce _any_ user-facing change?
   
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released SeaTunnel versions or within the unreleased branches such as dev.
   If no, write 'No'.
   If you are adding/modifying connector documents, please follow our new specifications: https://github.com/apache/seatunnel/issues/4544.
   -->
   
   Yes, this PR introduces user-facing changes in logging output:
   
   **Before:**
   ```
   stream load error for feNode: node1:8030 with exception: Connection refused
   stream load error for feNode: node2:8030 with exception: Connection refused
   DorisConnectorException: STREAM_LOAD_FAILED
   ```
   
   **After:**
   ```
   stream load error for feNode: node1:8030 with exception: Connection refused
   Trying next FE node: node2:8030
   stream load error for feNode: node2:8030 with exception: Connection refused
   All 2 FE nodes failed, no more nodes to try
   DorisConnectorException: STREAM_LOAD_FAILED
   ```
   
   This change improves operational visibility by:
   1. Showing which specific node will be tried next
   2. Providing clear summary when all nodes are exhausted
   3. Making the failover process more transparent for troubleshooting
   
   The functionality and APIs remain unchanged.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve]improve FE node failover logging for better observability [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #9657:
URL: https://github.com/apache/seatunnel/pull/9657#discussion_r2250339834


##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:
##########
@@ -140,6 +140,11 @@ private void initializeLoad() {
                         "stream load error for feNode: {} with exception: {}",
                         feNodes.get(i),
                         e.getMessage());
+                if (i < feNodesNum - 1) {
+                    log.info("Trying next FE node: {}", feNodes.get(i+1));

Review Comment:
   Let's move this log at create stream load object before.



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve]improve FE node failover logging for better observability [seatunnel]

Posted by "zhenyue-xu (via GitHub)" <gi...@apache.org>.
zhenyue-xu commented on code in PR #9657:
URL: https://github.com/apache/seatunnel/pull/9657#discussion_r2250386012


##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:
##########
@@ -140,6 +140,11 @@ private void initializeLoad() {
                         "stream load error for feNode: {} with exception: {}",
                         feNodes.get(i),
                         e.getMessage());
+                if (i < feNodesNum - 1) {
+                    log.info("Trying next FE node: {}", feNodes.get(i+1));

Review Comment:
   > Let's move this log at create stream load object before.
   
   Thanks for the review! Changes done.



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve]improve FE node failover logging for better observability [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #9657:
URL: https://github.com/apache/seatunnel/pull/9657#discussion_r2250532856


##########
seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/writer/DorisSinkWriter.java:
##########
@@ -120,6 +120,9 @@ private void initializeLoad() {
 
         for (int i = 0; i < feNodesNum; i++) {
             try {
+                if (i > 0) {
+                    log.info("Trying next FE node: {}", feNodes.get(i));
+                }

Review Comment:
   ```suggestion
                   log.info("Trying FE node {}  for stream load.", feNodes.get(i));
   ```



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve]improve FE node failover logging for better observability [seatunnel]

Posted by "Carl-Zhou-CN (via GitHub)" <gi...@apache.org>.
Carl-Zhou-CN merged PR #9657:
URL: https://github.com/apache/seatunnel/pull/9657


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org