Skip to content

Commit

Permalink
HPCC4J-648 RowServiceInputStream available log prefix into closed blo…
Browse files Browse the repository at this point in the history
…ck (#761)

Signed-off-by: James McMullan [email protected]
  • Loading branch information
jpmcmu authored Sep 18, 2024
1 parent 18f903e commit 173207c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1209,8 +1209,6 @@ private void compactBuffer()
@Override
public int available() throws IOException
{
String prefix = "RowServiceInputStream.available(), file " + dataPart.getFileName() + " part " + dataPart.getThisPart() + " on IP " + getIP() + ":";

// Do the check for closed first here to avoid data races
if (this.closed.get())
{
Expand All @@ -1223,6 +1221,8 @@ public int available() throws IOException
int availBytes = bufferLen - this.readPos;
if (availBytes == 0)
{
String prefix = "RowServiceInputStream.available(), file " + dataPart.getFileName() + " part " + dataPart.getThisPart() + " on IP " + getIP() + ":";

// this.bufferWriteMutex.release();
throw new IOException(prefix + "End of input stream, bufferLen:" + bufferLen + ", this.readPos:" + this.readPos + ", availableBytes=0");
}
Expand Down

0 comments on commit 173207c

Please sign in to comment.