Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Oct 16, 2024
1 parent b0d8dee commit 2b04d44
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public RowBatch getNext() throws Exception {
return coordinatorContext.asQueryProcessor().getNext();
}

public boolean isEof() {
public boolean isEos() {
return coordinatorContext.asQueryProcessor().isEos();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public void updateProfileIfPresent(Consumer<SummaryProfile> profileAction) {
.ifPresent(profileAction);
}

public boolean isEof() {
return coordinator.isEof();
public boolean isEos() {
return jobProcessor instanceof QueryProcessor && coordinator.isEos();
}

public void cancelSchedule(Status cancelReason) {
Expand All @@ -193,7 +193,7 @@ public synchronized Status readCloneStatus() {
public synchronized Status updateStatusIfOk(Status newStatus) {
// If query is done, we will ignore their cancelled updates, and let the remote fragments to clean up async.
Status originStatus = readCloneStatus();
if (coordinator.getJobProcessor() instanceof QueryProcessor && coordinator.isEof()
if (coordinator.getJobProcessor() instanceof QueryProcessor && coordinator.isEos()
&& newStatus.isCancelled()) {
return originStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void updateFragmentExecStatus(TReportExecStatusParams params) {
// and returned_all_results_ is true.
// (UpdateStatus() initiates cancellation, if it hasn't already been initiated)
if (!status.ok()) {
if (coordinatorContext.isEof() && status.isCancelled()) {
if (coordinatorContext.isEos() && status.isCancelled()) {
LOG.warn("Query {} has returned all results, fragment_id={} instance_id={}, be={}"
+ " is reporting failed status {}",
DebugUtil.printId(queryId), params.getFragmentId(),
Expand Down

0 comments on commit 2b04d44

Please sign in to comment.