-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-27925] [kubernetes]Performance optimization when watch tm pod and list pod. #21527
Conversation
We need to add a test to guard this behavior. |
@wangyang0918 Added a unit test to test that we can use withResourceversion("0 ") to listen on pods events when pod resourceversion=5668.5668 is a random resource version. |
@flinkbot run azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Mrart prepare for this pr, I have left some comments, please take a look.
...-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java
Outdated
Show resolved
Hide resolved
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java
Outdated
Show resolved
Hide resolved
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java
Outdated
Show resolved
Hide resolved
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
Outdated
Show resolved
Hide resolved
...-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
Outdated
Show resolved
Hide resolved
...-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
Outdated
Show resolved
Hide resolved
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java
Outdated
Show resolved
Hide resolved
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
...ernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java
Outdated
Show resolved
Hide resolved
e934d2b
to
9339bd5
Compare
It seems that some conflicts need to be resolved. |
@flinkbot run azure |
39b203f
to
783fcaf
Compare
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/Constants.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/apache/flink/kubernetes/kubeclient/resources/KubernetesPodsWatcherTest.java
Show resolved
Hide resolved
b001725
to
2708fe2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, I have no other comments. Let's wait and see if @huwh has any other concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mrart It seems that the e2e test case is failed, can you rebase on latest |
Fixed |
What is the purpose of the change
In the case of large-scale start and stop jobs, constantly reading data from etcd can cause a bottleneck in etcd performance. We can increase resourceversion=0 in watch to reduce data read from etcd.
Brief change log
Verifying this change
Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: ( no)Documentation