fix flaky test and improve error handling
just ignore invalid entries
This commit is contained in:
@@ -93,6 +93,7 @@ public class TcpIngestor implements AutoCloseable {
|
||||
}
|
||||
|
||||
if (entry.isPresent()) {
|
||||
LOGGER.trace("adding entry to queue: {}", entry);
|
||||
queue.put(entry.get());
|
||||
}
|
||||
|
||||
@@ -169,7 +170,7 @@ public class TcpIngestor implements AutoCloseable {
|
||||
db.put(new BlockingQueueIterator<>(queue, Entry.POISON));
|
||||
finished = true;
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.warn("Write to database failed. Will retry with the next element.", e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user