This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.8 by this push:
new 93727f9af [KYUUBI #5210][FOLLOWUP] Close batch operation log even
batch is in cancel state
93727f9af is described below
commit 93727f9af12abf50d9038312ebf0796b6347e3fb
Author: fwang12 <[email protected]>
AuthorDate: Mon Nov 20 18:03:26 2023 +0800
[KYUUBI #5210][FOLLOWUP] Close batch operation log even batch is in cancel
state
# :mag: Description
Followup for #5210
For batch operation, it has similar issue.
https://github.com/apache/kyuubi/issues/5210#issuecomment-1818499090
## Issue References ๐
This pull request fixes #
## Describe Your Solution ๐ง
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that are
required for this change.
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
---
# Checklists
## ๐ Author Self Checklist
- [x] My code follows the [style
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
of this project
- [ ] I have performed a self-review
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature
works
- [ ] New and existing unit tests pass locally with my changes
- [ ] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
## ๐ Committer Pre-Merge Checklist
- [x] Pull request title is okay.
- [x] No license issues.
- [ ] Milestone correctly set?
- [ ] Test coverage is ok
- [ ] Assignees are selected.
- [ ] Minimum number of approvals
- [ ] No changes are requested
**Be nice. Be informative.**
Closes #5733 from turboFei/batch_log_close.
Closes #5210
e2b72b476 [fwang12] Close batch log even batch is in cancel state
Authored-by: fwang12 <[email protected]>
Signed-off-by: fwang12 <[email protected]>
(cherry picked from commit 24fbd573fb5a5e6e01bce4d76d22f46e1db38f9d)
Signed-off-by: fwang12 <[email protected]>
---
.../org/apache/kyuubi/operation/BatchJobSubmission.scala | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
index f48cd0fcf..ba11dcb27 100644
---
a/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
+++
b/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
@@ -338,12 +338,6 @@ class BatchJobSubmission(
override def close(): Unit = withLockRequired {
if (!isClosedOrCanceled) {
- try {
- getOperationLog.foreach(_.close())
- } catch {
- case e: IOException => error(e.getMessage, e)
- }
-
MetricsSystem.tracing(_.decCount(MetricRegistry.name(OPERATION_OPEN,
opType)))
// fast fail
@@ -379,6 +373,12 @@ class BatchJobSubmission(
}
}
}
+
+ try {
+ getOperationLog.foreach(_.close())
+ } catch {
+ case e: IOException => error(e.getMessage, e)
+ }
}
override def cancel(): Unit = {