dongjoon-hyun opened a new pull request, #54158:
URL: https://github.com/apache/spark/pull/54158

   ### What changes were proposed in this pull request?
   
   This PR aims to improve `annotateExecutorDeletionCost` to use `patch` 
instead of `edit` API.
   
   ### Why are the changes needed?
   
   **Network Efficiency**
   
   - `edit` requires fetching the entire resource and sending the full updated 
resource back.
   - `patch` only transmits the specific changes, making it much more 
network-efficient.
   
   **Concurrency & Conflict Resolution**
   
   - `edit` typically follows a Get -> Modify -> Update (PUT) pattern. Using 
this pattern creates a race condition where, if another client modifies the 
resource in between, a 409 Conflict error occurs due to a mismatched 
resourceVersion.
   - `patch` sends only the changes (delta) to the server, where the merge is 
handled server-side. This significantly reduces the risk of conflicts, 
especially for simple operations like adding an annotation.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No behavior change.
   
   ### How was this patch tested?
   
   Pass the CIs with newly updated test case.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: `Gemini 3 Pro (High)` on `Antigravity`


-- 
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]

Reply via email to