Skip to content

Commit

Permalink
Fix for query closing on iterative algorithms.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanKarab committed Jan 18, 2021
1 parent 9fd60d5 commit 27b72fc
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,15 @@ public void produceContent(ContentEncoder encoder, IOControl ioctrl) throws IOEx
this.buffer.compact();
if (i < 1 && !buffering) {
encoder.complete();
closeQuery();
close();
}
} else {
encoder.write(ByteBuffer.wrap(
finalizeQueryStatus.getError().getBytes()));
encoder.complete();
closeQuery();
close();
}
} else {
// Algorithm execution failed, notify the client.
Expand Down Expand Up @@ -164,13 +168,12 @@ public void produceContent(ContentEncoder encoder, IOControl ioctrl) throws IOEx
encoder.write(buffer);
this.buffer.compact();
encoder.complete();
closeQuery();
close();
}
} finally {
if (iterativeAlgorithmState != null)
iterativeAlgorithmState.releaseLock();

closeQuery();
close();
}
}

Expand Down

0 comments on commit 27b72fc

Please sign in to comment.