Log exceptions thrown before persist() for indexing tasks (#5374)

* Log exceptions thrown before persist() for indexing tasks

* PR comment
This commit is contained in:
Jonathan Wei 2018-02-13 09:20:07 -08:00 committed by Charles Allen
parent 49a6b0b8a6
commit b234a119ac
2 changed files with 12 additions and 0 deletions

View File

@ -796,6 +796,10 @@ public class KafkaIndexTask extends AbstractTask implements ChatHandler
} }
} }
} }
catch (Exception e) {
log.error(e, "Encountered exception in run() before persisting.");
throw e;
}
finally { finally {
log.info("Persisting all pending data"); log.info("Persisting all pending data");
driver.persist(committerSupplier.get()); // persist pending data driver.persist(committerSupplier.get()); // persist pending data
@ -1155,6 +1159,10 @@ public class KafkaIndexTask extends AbstractTask implements ChatHandler
} }
} }
} }
catch (Exception e) {
log.error(e, "Encountered exception in runLegacy() before persisting.");
throw e;
}
finally { finally {
driver.persist(committerSupplier.get()); // persist pending data driver.persist(committerSupplier.get()); // persist pending data
} }

View File

@ -735,6 +735,10 @@ public class IndexTask extends AbstractTask
} }
} }
} }
catch (Exception e) {
log.error(e, "Encountered exception in generateAndPublishSegments() before persisting.");
throw e;
}
finally { finally {
driver.persist(committerSupplier.get()); driver.persist(committerSupplier.get());
} }