markap14 commented on a change in pull request #4852:
URL: https://github.com/apache/nifi/pull/4852#discussion_r585065853



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-stateless-bundle/nifi-stateless-engine/src/main/java/org/apache/nifi/stateless/flow/StandardStatelessDataflowFactory.java
##########
@@ -148,7 +149,19 @@ public StatelessDataflow createDataflow(final 
StatelessEngineConfiguration engin
                 narClassLoaders, extensionClients);
 
             final VariableRegistry variableRegistry = 
VariableRegistry.EMPTY_REGISTRY;
-            final PropertyEncryptor encryptor = 
getPropertyEncryptor(engineConfiguration.getSensitivePropsKey());
+            final Supplier<PropertyEncryptor> encryptorFactory = new 
Supplier<PropertyEncryptor>() {
+                private PropertyEncryptor created = null;
+
+                @Override
+                public synchronized PropertyEncryptor get() {

Review comment:
       I don't think lock contention is a concern here. It'll be called rarely. 
The synchronization won't add any significant overhead within the context that 
it's evaluated.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to