Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/71#discussion_r35454037
--- Diff:
nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteOnAttribute.java
---
@@ -103,6 +105,8 @@
private volatile String configuredRouteStrategy =
ROUTE_STRATEGY.getDefaultValue();
private volatile Set<String> dynamicPropertyNames = new HashSet<>();
+ private final Map<Relationship, PropertyValue> propertyMap = new
HashMap<>();
--- End diff --
Map is both modified and read by multiple threads. This is a thread-safety
issue. If we change the 'final' modifier to 'volatile' it should address this
(assuming that the @OnUnscheduled annotation is changed to @OnStopped), since
it is modified only in the @OnScheduled and @OnStopped method, and no other
threads can be in this class at that time.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---