-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-41410][K8S][FOLLOWUP] Remove PVC_COUNTER decrement #38949
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
Conversation
|
cc @tedyu |
|
For reviewers, the following test case is added. |
|
I'll test this PR more in the cluster. |
|
I already suggest you to use my test code to verify your PR, @tedyu . |
dongjoon-hyun
left a comment
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.
Could you review this follow-up, @viirya ?
| .inNamespace(namespace) | ||
| .resource(createdExecutorPod) | ||
| .delete() | ||
| PVC_COUNTER.decrementAndGet() |
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.
This is for case 1, right? For case 2, we don't need to do anything as PVC_COUNTER was not changed for that case?
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.
Yes, right for case 1 and 2. So, this is a complete and minimal patch, @viirya .
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.
Since this is used for driver-owned PVCs, the deletion of pods is irrelevant to the number of PVC. That was my logical bug at the initial patch.
viirya
left a comment
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.
Looks good to me.
|
Thank you so much, @viirya . Merged to master. |
### What changes were proposed in this pull request? This is a follow-up to remove `PVC_COUNTER` decrement part to handle exception cases. ### Why are the changes needed? This PR handles the following two cases. 1. If pod creation API throws `KubernetesClientException`, we should not change `PVC_COUNTER`. 2. In case of (1), Spark try to delete pod. If pod deletion API also throws `KubernetesClientException`, we should not change `PVC_COUNTER`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs with the newly added test case. Closes apache#38949 from dongjoon-hyun/SPARK-41410-2. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This is a follow-up to remove
PVC_COUNTERdecrement part to handle exception cases.Why are the changes needed?
This PR handles the following two cases.
KubernetesClientException, we should not changePVC_COUNTER.KubernetesClientException, we should not changePVC_COUNTER.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs with the newly added test case.