fix flaky test and improve error handling

just ignore invalid entries
This commit is contained in:
2017-03-18 10:14:41 +01:00
parent a221259417
commit a01c8b3907
10 changed files with 74 additions and 50 deletions

View File

@@ -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;