You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "zhengchenyu (via GitHub)" <gi...@apache.org> on 2025/08/07 02:06:17 UTC
[PR] HIVE-29124: Avoid committing files when a task is aborted even though… [hive]
zhengchenyu opened a new pull request, #6011:
URL: https://github.com/apache/hive/pull/6011
### What changes were proposed in this pull request?
Two change:
* Does not allow abort to be set from true to false.
* dummyOps also aborts.
### Why are the changes needed?
I found that when the task is almost completed (more precisely, when the source has been processed), but not closed, if an exception is thrown at this time, it may cause the file to be committed incorrectly.
Look at the below code. abort may be set from true to false. It is not reasonable. The correct logic is that as long as abort is set to true at one place, abort should always be true, then do not commit.
https://github.com/apache/hive/blob/9b07c5c7136863ae1eb469e7a3c11357299d2ea1/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java#L349
When I tried to reproduce this bug, I found that only [dummyOp.close(abort)](https://github.com/apache/hive/blob/9b07c5c7136863ae1eb469e7a3c11357299d2ea1/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java#L369) caused the problem. I initially thought that the problem would occur at [reducer.close(abort)](https://github.com/apache/hive/blob/9b07c5c7136863ae1eb469e7a3c11357299d2ea1/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java#L356) because the reduce op's abort was set to true in the abort. However, dummyOps was not properly aborted. Here, dummyOps should also be aborted. Therefore, the issue only occurs when dummyOps is used, such as in mapjoin.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Use real tasks.
> Note: This is a low-probability issue, and I added sleep code at a specific location to increase the probability of this bug.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3219940211
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011) **Quality Gate passed**
Issues
 [68 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315638404
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,19 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (mergeWorkList != null) {
+ for (BaseWork redWork : mergeWorkList) {
+ ((ReduceWork) redWork).getReducer().abort();
Review Comment:
I mentioned introducing a reduceWork.abort(), what about reusing it here too?
so instead of
```
((ReduceWork) redWork).getReducer().abort();
```
maybe you can do:
```
((ReduceWork) redWork).abort();
```
so ReduceWork.abort() could take care of:
1. aborting the Operator (which is returned by getReducer)
2. aborting dummy ops
this might cover an uncovered case (not sure if it's an issue at all), which is dummyOps field of ReduceWork instances in this mergeWorkList
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293592077
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
+ boolean abort = rs.close();
Review Comment:
i would reverse the `rs.close()` result and return !abort, cause it's not logical to return true and mark as aborted
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
+ boolean abort = rs.close();
Review Comment:
i would reverse the `rs.close()` result and return !abort, cause it's not logical to return true and mark as aborted
````
boolean abort = isAborted();
for (ReduceRecordSource rs : sources) {
if (!rs.close()) {
abort = true;
break;
}
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315564589
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,19 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (mergeWorkList != null) {
+ for (BaseWork redWork : mergeWorkList) {
+ ((ReduceWork) redWork).getReducer().abort();
+ }
+ }
+ if (reduceWork != null) {
+ List<HashTableDummyOperator> dummyOps = reduceWork.getDummyOps();
+ if (dummyOps != null) {
+ for (Operator<?> dummyOp : dummyOps) {
+ dummyOp.abort();
+ }
+ }
+ }
Review Comment:
this implementation doesn't belong here, ReduceRecordProcessor is already overloaded, what about introducing reduceWork.abort() and do the rest there
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293711032
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
in my opinion it's not logical to return true in `rs.close()` when you need to abort. true usually means success
````
boolean close() throws Exception {
...
return !abort;
}
````
and then
````
boolean abort = isAborted();
for (ReduceRecordSource rs: sources) {
abort |= !rs.close();
}
if (abort) {
setAborted(true);
}
````
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
legacy code
````
for (ReduceRecordSource rs: sources) {
abort = abort && rs.close();
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293676404
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
legacy code
````
for (ReduceRecordSource rs: sources) {
abort = abort && rs.close();
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2260264953
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
isAborted() is always true here. i don't understand what are you trying to accomplish here: set true -> true?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2260264953
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
isAborted() is always true here. i don't understand what are you trying to accomplish here
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315564589
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,19 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (mergeWorkList != null) {
+ for (BaseWork redWork : mergeWorkList) {
+ ((ReduceWork) redWork).getReducer().abort();
+ }
+ }
+ if (reduceWork != null) {
+ List<HashTableDummyOperator> dummyOps = reduceWork.getDummyOps();
+ if (dummyOps != null) {
+ for (Operator<?> dummyOp : dummyOps) {
+ dummyOp.abort();
+ }
+ }
+ }
Review Comment:
this implementation doesn't belong here, ReduceRecordProcessor is already overloaded, what about reduceWork.abort() and do the rest there
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2318829665
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
yep
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3167715962
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293585607
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
+ boolean abort = rs.close();
Review Comment:
i would reverse the `rs.close()` result and return !abort, cause it's not logical to return true and mark as aborted
````
boolean abort = isAborted();
for (ReduceRecordSource rs : sources) {
if (!rs.close()) {
abort = true;
break;
}
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293585607
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
+ boolean abort = rs.close();
Review Comment:
i would reverse the `rs.close()` result and return !abort, cause it's not logical to return true and mark as aborted
````
for (ReduceRecordSource rs : sources) {
if (!rs.close() && !isAborted()) {
setAborted(true);
break;
}
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3244698812
overall looks good to me, as it's in line with the description of [HIVE-14042](https://issues.apache.org/jira/browse/HIVE-14042), more specifically `ReduceRecordProcessor: dummyOp handling` so this issue has been suspected already
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315778631
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,19 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (mergeWorkList != null) {
+ for (BaseWork redWork : mergeWorkList) {
+ ((ReduceWork) redWork).getReducer().abort();
Review Comment:
@a This code is indeed better, I have fix it.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3249335385
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011) **Quality Gate passed**
Issues
 [112 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293585607
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
+ boolean abort = rs.close();
Review Comment:
maybe
````
for (ReduceRecordSource rs : sources) {
if (rs.close() && !isAborted()) {
setAborted(true);
break;
}
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293592077
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
+ boolean abort = rs.close();
Review Comment:
i would reverse the `rs.close()` result and return !abort, cause it's not logical to return true and mark as aborted
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315638404
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,19 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (mergeWorkList != null) {
+ for (BaseWork redWork : mergeWorkList) {
+ ((ReduceWork) redWork).getReducer().abort();
Review Comment:
I mentioned introducing a reduceWork.abort(), what about reusing it here too?
so instead of
```
((ReduceWork) redWork).getReducer().abort();
```
maybe you can do:
```
((ReduceWork) redWork).abort();
```
so ReduceWork.abort() could take care of:
1. aborting the Operator (which is returned by getReducer)
2. aborting dummy ops
so like:
this might cover an uncovered case (not sure if it's an issue at all), which is dummyOps field of ReduceWork instances in this mergeWorkList
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2260264953
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
isAborted() is already true here. i don't understand what are you trying to accomplish here
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2260264953
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
isAborted() is always true here
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2262006594
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
> isAborted() is always true here. i don't understand what are you trying to accomplish here: set true -> true?
I have a problem with migrating the code from our internal version. I will fix it.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2297657183
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
Here just to set dummyop's abort to true.
In my bug scenario, abort was incorrectly set from true to false. Therefore, when dummyOp.close(abort) was called, it would cause unexpected commit file. If dummyOp's abort was set to true here, it would not commit.
> Note: If `for (ReduceRecordSource rs: sources)` is handled correctly, there is no problem if it is not modified here. I just think that when abort is set to true in one place, it means that this task attempt is useless, so all ops should be set to true.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3253122523
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011) **Quality Gate passed**
Issues
 [112 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315532912
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
returning a boolean from close is confusing anyway without a proper method javadoc on ReduceRecordSource.close(), please create one
as this return value is used in ReduceRecordProcessor only, I'm OK with changing the behavior, but let's clarify it with a javadoc comment
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "abstractdog (via GitHub)" <gi...@apache.org>.
abstractdog commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315532912
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
returning a boolean from close is confusing anyway without a proper javadoc on ReduceRecordSource.close, please create one...as this return value is used in ReduceRecordProcessor only, I'm fine with changing the behavior, but let's clarify it with javadoc comments
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2297657183
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
@deniskuzZ
Here just to set dummyop's abort to true.
In my bug scenario, abort was incorrectly set from true to false. Therefore, when dummyOp.close(abort) was called, it would cause unexpected commit file. If dummyOp's abort was set to true here, it would not commit.
> Note: If `for (ReduceRecordSource rs: sources)` is handled correctly, there is no problem if it is not modified here. I just think that when abort is set to true in one place, it means that this task attempt is useless, so all ops should be set to true.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293783322
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
do we need to abort `mergeWorkList` as well?
i am not sure we need this here, won't we release the resources in close?
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
do we need to abort `mergeWorkList` as well?
i am not sure we need this here, won't we release the resources in close()?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2262006594
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
> isAborted() is always true here. i don't understand what are you trying to accomplish here: set true -> true?
I have a problem with migrating the code from our internal version. I will fix it.
Write
Preview
Cancel
Update comment
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
> isAborted() is always true here. i don't understand what are you trying to accomplish here: set true -> true?
I have a problem with migrating the code from our internal version. I will fix it.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though… [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3162195622
@kgyrtkirk @abstractdog @zabetak Can you please review this PR?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2260264953
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
isAborted is always true here
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2262017949
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -345,9 +353,9 @@ void close() {
try {
if (isAborted()) {
for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
+ boolean abort = rs.close();
+ if (!isAborted() && abort) {
Review Comment:
@deniskuzZ Thanks for your review! I have fix it. Sorry for migrating code incorrectly.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293783322
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
do we need to abort `mergeWorkList` as well?
i am not sure we need this, won't we release the resources in close?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2297697479
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
@deniskuzZ Sorry I misread it. You were referring to mergeWorkList. Personally, I think abort would make sense. Because I think as long as abort is set to true, any logic in op.close where abort is false should not be executed. What do you think?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3162254357
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293711032
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
also in my opinion it's not logical to return true in `rs.close()` when you need to abort. true usually means success
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ merged PR #6011:
URL: https://github.com/apache/hive/pull/6011
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "zhengchenyu (via GitHub)" <gi...@apache.org>.
zhengchenyu commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2315778631
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,19 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (mergeWorkList != null) {
+ for (BaseWork redWork : mergeWorkList) {
+ ((ReduceWork) redWork).getReducer().abort();
Review Comment:
This code is indeed better, I have fix it.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6011:
URL: https://github.com/apache/hive/pull/6011#issuecomment-3245125119
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011) **Quality Gate passed**
Issues
 [112 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6011&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6011&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6011&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6011)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293711032
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -343,12 +351,10 @@ void close() {
}
try {
- if (isAborted()) {
- for (ReduceRecordSource rs : sources) {
- if (!rs.close()) {
- setAborted(false); // Preserving the old logic. Hmm...
- break;
- }
+ for (ReduceRecordSource rs : sources) {
Review Comment:
also in my opinion it's not logical to return true in `rs.close()` when you need to abort. true usually means success
````
boolean close() throws Exception {
...
return !abort;
}
````
and then
````
boolean abort = isAborted();
for (ReduceRecordSource rs: sources) {
abort |= !rs.close();
}
if (abort) {
setAborted(true);
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29124: Avoid committing files when a task is aborted even though some source has completed. [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6011:
URL: https://github.com/apache/hive/pull/6011#discussion_r2293783322
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
do we need to abort `mergeWorkList`?
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ReduceRecordProcessor.java:
##########
@@ -305,6 +305,14 @@ public void abort() {
} else {
LOG.info("reducer not setup yet. abort not being forwarded");
}
+ if (reduceWork != null) {
Review Comment:
do we need to abort `mergeWorkList` as well?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org