Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import org.apache.druid.common.guava.FutureUtils;
import org.apache.druid.frame.channel.ChannelClosedForWritesException;
import org.apache.druid.frame.channel.ReadableByteChunksFrameChannel;
import org.apache.druid.frame.file.FrameFileHttpResponseHandler;
import org.apache.druid.frame.file.FrameFilePartialFetch;
Expand Down Expand Up @@ -219,12 +220,18 @@ public ListenableFuture<Boolean> fetchChannelData(
public void onSuccess(FrameFilePartialFetch partialFetch)
{
if (partialFetch.isExceptionCaught()) {
// Exception while reading channel. Recoverable.
log.noStackTrace().info(
partialFetch.getExceptionCaught(),
"Encountered exception while reading channel [%s]",
channel.getId()
);
if (partialFetch.getExceptionCaught() instanceof ChannelClosedForWritesException) {
// Channel was closed. Stop trying.
retVal.setException(partialFetch.getExceptionCaught());
return;
} else {
// Exception while reading channel. Recoverable.
log.noStackTrace().warn(
partialFetch.getExceptionCaught(),
"Attempting recovery after exception while reading channel[%s]",
channel.getId()
);
}
}

// Empty fetch means this is the last fetch for the channel.
Expand Down
Loading