viirya commented on a change in pull request #33949:
URL: https://github.com/apache/spark/pull/33949#discussion_r705787617
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsPollingSnapshotSource.scala
##########
@@ -67,9 +67,9 @@ private[spark] class ExecutorPodsPollingSnapshotSource(
if (conf.get(KUBERNETES_EXECUTOR_API_POLLING_WITH_RESOURCE_VERSION)) {
val list = pods.list(new
ListOptionsBuilder().withResourceVersion("0").build())
val newResourceVersion =
UnsignedLong.valueOf(list.getMetadata.getResourceVersion())
- // Replace only when we receive a monotonically increased
resourceVersion
+ // Replace only when we receive a monotonically increased or equal
resourceVersion
// because some K8s API servers may return old(smaller) cached
versions in case of HA setup.
- if (resourceVersion == null ||
newResourceVersion.compareTo(resourceVersion) > 0) {
+ if (resourceVersion == null ||
newResourceVersion.compareTo(resourceVersion) >= 0) {
Review comment:
nvm, got the idea. yea, it looks reasonable.
--
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]