You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "JTaky (via GitHub)" <gi...@apache.org> on 2023/04/13 14:42:00 UTC

[GitHub] [flink] JTaky opened a new pull request, #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

JTaky opened a new pull request, #22394:
URL: https://github.com/apache/flink/pull/22394

   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   Given PR adds a new configuration to disable EnsembleTracking feature for Apache Curator.
   
   
   ## Brief change log
   
   - Adds a new configuration into HighAvailabilityOptions
   - Use newly added ZOOKEEPER_ENSEMBLE_TRACKING flag to control Curator ensemble tracking
   - Default value is enabling ensemble tracking for backward compatibility, see [Curator source code](https://github.com/apache/curator/blob/master/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java#L72)
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage. 
   The code path is executed in several test scenarios, e.g. ZooKeeperLeaderElectionITCase#testJobExecutionOnClusterWithLeaderChange.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: yes
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? docs / JavaDocs
   


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] flinkbot commented on pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #22394:
URL: https://github.com/apache/flink/pull/22394#issuecomment-1507110732

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "bb88c4f6d901684084e40a619b9d7eee585c4b64",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "bb88c4f6d901684084e40a619b9d7eee585c4b64",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * bb88c4f6d901684084e40a619b9d7eee585c4b64 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] XComp commented on a diff in pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "XComp (via GitHub)" <gi...@apache.org>.
XComp commented on code in PR #22394:
URL: https://github.com/apache/flink/pull/22394#discussion_r1183708820


##########
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java:
##########
@@ -199,6 +199,23 @@ public class HighAvailabilityOptions {
                                             TextElement.code("true"))
                                     .build());
 
+    @Documentation.Section(Documentation.Sections.EXPERT_ZOOKEEPER_HIGH_AVAILABILITY)
+    public static final ConfigOption<Boolean> ZOOKEEPER_ENSEMBLE_TRACKING =
+            key("high-availability.zookeeper.client.ensemble-tracker")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            Description.builder()
+                                    .text(
+                                            "Defines whether Curator should enable ensemble tracker. This can be useful in certain scenarios "
+                                                    + "in which CuratorFramework is accessing to ZK clusters via load balancer or Virtual IPs. "
+                                                    + "Default Curator EnsembleTracking logic watches CuratorEventType.GET_CONFIG events and"

Review Comment:
   ```suggestion
                                                       + "Default Curator EnsembleTracking logic watches CuratorEventType.GET_CONFIG events and "
   ```



##########
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java:
##########
@@ -199,6 +199,23 @@ public class HighAvailabilityOptions {
                                             TextElement.code("true"))
                                     .build());
 
+    @Documentation.Section(Documentation.Sections.EXPERT_ZOOKEEPER_HIGH_AVAILABILITY)
+    public static final ConfigOption<Boolean> ZOOKEEPER_ENSEMBLE_TRACKING =
+            key("high-availability.zookeeper.client.ensemble-tracker")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            Description.builder()
+                                    .text(
+                                            "Defines whether Curator should enable ensemble tracker. This can be useful in certain scenarios "
+                                                    + "in which CuratorFramework is accessing to ZK clusters via load balancer or Virtual IPs. "
+                                                    + "Default Curator EnsembleTracking logic watches CuratorEventType.GET_CONFIG events and"
+                                                    + "changes zookeeper connection string, it is not desired behaviour when ZooKeeper is running under the Virtual IPs."

Review Comment:
   ```suggestion
                                                       + "changes ZooKeeper connection string. It is not desired behaviour when ZooKeeper is running under the Virtual IPs. "
   ```



##########
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java:
##########
@@ -199,6 +199,23 @@ public class HighAvailabilityOptions {
                                             TextElement.code("true"))
                                     .build());
 
+    @Documentation.Section(Documentation.Sections.EXPERT_ZOOKEEPER_HIGH_AVAILABILITY)
+    public static final ConfigOption<Boolean> ZOOKEEPER_ENSEMBLE_TRACKING =
+            key("high-availability.zookeeper.client.ensemble-tracker")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            Description.builder()
+                                    .text(
+                                            "Defines whether Curator should enable ensemble tracker. This can be useful in certain scenarios "
+                                                    + "in which CuratorFramework is accessing to ZK clusters via load balancer or Virtual IPs. "
+                                                    + "Default Curator EnsembleTracking logic watches CuratorEventType.GET_CONFIG events and"
+                                                    + "changes zookeeper connection string, it is not desired behaviour when ZooKeeper is running under the Virtual IPs."
+                                                    + "Under certain configurations EnsembleTracking can lead to setting of Zookeeper connection string "
+                                                    + "with unresolvable hostnames.",
+                                            TextElement.code("true"))

Review Comment:
   ```suggestion
                                                       + "with unresolvable hostnames.")
   ```
   Looks like a copy&paste error.



##########
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java:
##########
@@ -199,6 +199,23 @@ public class HighAvailabilityOptions {
                                             TextElement.code("true"))
                                     .build());
 
+    @Documentation.Section(Documentation.Sections.EXPERT_ZOOKEEPER_HIGH_AVAILABILITY)
+    public static final ConfigOption<Boolean> ZOOKEEPER_ENSEMBLE_TRACKING =
+            key("high-availability.zookeeper.client.ensemble-tracker")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            Description.builder()
+                                    .text(
+                                            "Defines whether Curator should enable ensemble tracker. This can be useful in certain scenarios "
+                                                    + "in which CuratorFramework is accessing to ZK clusters via load balancer or Virtual IPs. "
+                                                    + "Default Curator EnsembleTracking logic watches CuratorEventType.GET_CONFIG events and"
+                                                    + "changes zookeeper connection string, it is not desired behaviour when ZooKeeper is running under the Virtual IPs."
+                                                    + "Under certain configurations EnsembleTracking can lead to setting of Zookeeper connection string "

Review Comment:
   ```suggestion
                                                       + "Under certain configurations EnsembleTracking can lead to setting of ZooKeeper connection string "
   ```



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] XComp commented on pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "XComp (via GitHub)" <gi...@apache.org>.
XComp commented on PR #22394:
URL: https://github.com/apache/flink/pull/22394#issuecomment-1547381717

   I was planning to merge the PR but was blocked by FLINK-32066. The issue is resolved and CI is green for this change. I will go ahead and merge it.


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] XComp commented on pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "XComp (via GitHub)" <gi...@apache.org>.
XComp commented on PR #22394:
URL: https://github.com/apache/flink/pull/22394#issuecomment-1542112096

   CI is still failing.


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] XComp commented on pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "XComp (via GitHub)" <gi...@apache.org>.
XComp commented on PR #22394:
URL: https://github.com/apache/flink/pull/22394#issuecomment-1545294936

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] JTaky commented on pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "JTaky (via GitHub)" <gi...@apache.org>.
JTaky commented on PR #22394:
URL: https://github.com/apache/flink/pull/22394#issuecomment-1542593976

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] JTaky commented on pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "JTaky (via GitHub)" <gi...@apache.org>.
JTaky commented on PR #22394:
URL: https://github.com/apache/flink/pull/22394#issuecomment-1546005491

   Thanks a lot for the review! 
   Sorry but I think I cannot merge this PR.
   
   <img width="587" alt="Screenshot 2023-05-12 at 18 33 32" src="https://github.com/apache/flink/assets/1190166/b189cc24-b9ea-4b35-be12-c2b4a815d045">
   


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] XComp merged pull request #22394: [FLINK-31780][component=Runtime/Coordination] Allow users to disable 'Ensemble tracking' feature for ZooKeeper Curator framework

Posted by "XComp (via GitHub)" <gi...@apache.org>.
XComp merged PR #22394:
URL: https://github.com/apache/flink/pull/22394


-- 
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: issues-unsubscribe@flink.apache.org

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