From 0b8e381b8dae2629f3672a96c368d520897fe88f Mon Sep 17 00:00:00 2001 From: James McMullan Date: Wed, 18 Sep 2024 11:24:53 -0400 Subject: [PATCH] HPCC4J-648 RowServiceInputStream available log prefix into closed block - Moved log prefix construction in available into closed block Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- .../org/hpccsystems/dfs/client/RowServiceInputStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java index e2467b066..99cced5a2 100644 --- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java +++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java @@ -1435,8 +1435,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()) { @@ -1449,6 +1447,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(); IOException wrappedException = new IOException(prefix + "End of input stream, bufferLen:" + bufferLen + ", this.readPos:" + this.readPos + ", availableBytes=0"); throw wrappedException;