Github user nickwallen commented on a diff in the pull request: https://github.com/apache/metron/pull/1190#discussion_r216739437 --- Diff: metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrUpdateDao.java --- @@ -117,18 +118,19 @@ public void batchUpdate(Map<Document, Optional<String>> updates) throws IOExcept } catch (SolrServerException e) { throw new IOException(e); } + return updates; } @Override - public void addCommentToAlert(CommentAddRemoveRequest request) throws IOException { + public Document addCommentToAlert(CommentAddRemoveRequest request) throws IOException { Document latest = retrieveLatestDao.getLatest(request.getGuid(), request.getSensorType()); - addCommentToAlert(request, latest); + return addCommentToAlert(request, latest); } @Override - public void addCommentToAlert(CommentAddRemoveRequest request, Document latest) throws IOException { + public Document addCommentToAlert(CommentAddRemoveRequest request, Document latest) throws IOException { if (latest == null) { - return; + return null; --- End diff -- Should we also treat this as an exceptional condition too?
---