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 @@ -17,7 +17,7 @@

class PollingBase {
private final FDv2Requestor requestor;
private final LDLogger logger;
protected final LDLogger logger;

public PollingBase(FDv2Requestor requestor, LDLogger logger) {
this.requestor = requestor;
Expand Down Expand Up @@ -119,7 +119,8 @@ protected CompletableFuture<FDv2SourceResult> poll(Selector selector, boolean on
);
return FDv2SourceResult.changeSet(converted, fdv1Fallback);
} catch (Exception e) {
// TODO: Do we need to be more specific about the exception type here?
// Whatever exception happened here means we couldn't handle the data. So we are going to
// treat that as invalid data.
DataSourceStatusProvider.ErrorInfo info = new DataSourceStatusProvider.ErrorInfo(
DataSourceStatusProvider.ErrorKind.INVALID_DATA,
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ private void doPoll() {
} else {
resultQueue.put(res);
}
} catch (InterruptedException | ExecutionException e) {
// TODO: Determine if handling is needed.
} catch (InterruptedException e) {
// This would likely be the result of a shutdown, so we are just logging this for debugging purposes.
// Same with the ExecutionException below.
logger.debug("Polling thread interrupted: {}", e.toString());
Thread.currentThread().interrupt();
}
catch(ExecutionException e) {
logger.debug("Polling thread execution exception: {}", e.toString());
}
}

Expand Down