Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2411#discussion_r164503950
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExtractGrok.java
---
@@ -142,10 +194,11 @@
.description("FlowFiles are routed to this relationship when
no provided Grok Expression matches the content of the FlowFile")
.build();
+
private final static List<PropertyDescriptor> descriptors;
private final static Set<Relationship> relationships;
- private volatile Grok grok = new Grok();
+ private volatile List<Grok> grokList = new ArrayList<>();
--- End diff --
This ArrayList is modified once created, so marking it as volatile is not
sufficient from a thread-safety point of view. We would need to either create a
new list each time instead of calling `clear()` in the @OnScheduled method or
make it a synchronized list.
---