Skip to content

Commit

Permalink
fixed ConcurrentModificationException in River class
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Dec 27, 2020
1 parent d2c6d9a commit 62f1d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions para-server/src/main/java/com/erudika/para/queue/River.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ protected int processIndexPayload(String appid, String opId, Map<String, Object>
}
return 1;
} catch (Exception e) {
logger.error("Indexing operation " + opId + " failed!", e);
logger.error("Indexing operation " + opId + " failed for app '" + appid + "'!", e);
}
return 0;
}
Expand All @@ -306,7 +306,7 @@ private void indexAllWithRetry(String appid, Object payload) {
Map<String, ParaObject> objs = Para.getDAO().readAll(appid, ids, true);
Para.getSearch().indexAll(appid, objs.values().stream().filter(v -> v != null).collect(Collectors.toList()));

if (objs.keySet().stream().anyMatch(k -> objs.get(k) == null)) {
if (objs.containsValue(null)) {
if (pendingIds == null) {
pendingIds = new ConcurrentHashMap<>();
}
Expand Down

0 comments on commit 62f1d88

Please sign in to comment.