wForget opened a new pull request, #7832:
URL: https://github.com/apache/kyuubi/pull/7832

   ### Why are the changes needed?
   
   Currently, NOT_FOUND application stated is treated as a terminated but not 
failed state.
   
   It might cause some data quality issue if downstream application depends on 
the batch state for data processing.
   
   So, I think we should treat NOT_FOUND as a failed state instead.
   
   Currently, we support 3 types of application manager.
   1. 
[JpsApplicationOperation](https://github.com/apache/kyuubi/blob/master/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/JpsApplicationOperation.scala)
   2. 
[YarnApplicationOperation](https://github.com/apache/kyuubi/blob/master/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/YarnApplicationOperation.scala)
   3. 
[KubernetesApplicationOperation](https://github.com/apache/kyuubi/blob/master/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala)
   
   YarnApplicationOperation and KubernetesApplicationOperation are widely used 
in production use case.
   
   And in multiple kyuubi instance mode, the NOT_FOUND case should rarely 
happen.
   1.  
https://github.com/apache/kyuubi/blob/7e199d6fdbdf52222bb3eadd056b9e5a2295f36e/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala#L369-L385
   
   3. https://github.com/apache/kyuubi/pull/7029
   
   So, I think we should treat NOT_FOUND as a failed state in production use 
case. It is better to fail some corner cases than to mistakenly set 
unsuccessful batches to the finished state.
   
   ### How was this patch tested?
   
   GA.
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.
   
   Closes #7033 from turboFei/revist_not_found.
   
   Closes #7033
   
   ada4f8822 [Cheng Pan] Update 
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ApplicationOperation.scala
 985e23c24 [Wang, Fei] Refine
   f03d61242 [Wang, Fei] comments
   b9d6ac203 [Wang, Fei] incase the metadata updated by peer instance 3bd61ca85 
[Wang, Fei] add
   339df4730 [Wang, Fei] treat NOT_FOUND as failed
   
   Lead-authored-by: Wang, Fei <[email protected]>
   
   
   (cherry picked from commit ecfca79328c0c7add3154457e2f723b6c49e8782)
   
   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: 
https://kyuubi.readthedocs.io/en/master/contributing/code/index.html
     2. If the PR is related to an issue in 
https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, 
e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., 
'[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new feature, clarify the use cases.
     2. If you fix a bug, you can clarify why it is a bug, and what versions 
are affected.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some 
test cases that check the changes thoroughly including negative and positive 
cases if possible.
   If it was tested in a way different from regular unit tests, please clarify 
how you tested step by step, ideally copy and paste-able, so that other 
reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why 
it was difficult to add.
   -->
   
   
   ### Was this patch assisted by generative AI tooling?
   <!--
   If generative AI tooling has assisted in authoring or reviewing this patch, 
please include
   an 'Assisted-by: ' trailer that identifies the agent and/or model.
   For example: 'Assisted-by: Claude Opus 4.7' or 'Assisted-by: 
Claude:claude-opus-4-7'.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) for 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: [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