Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1220#discussion_r87897741
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/NiFiPropertiesLoader.java
 ---
    @@ -158,9 +158,7 @@ private static String getDefaultProviderKey() {
         }
     
         private void initializeSensitivePropertyProviderFactory() {
    -        if (sensitivePropertyProviderFactory == null) {
    -            sensitivePropertyProviderFactory = new 
AESSensitivePropertyProviderFactory(keyHex);
    -        }
    +        sensitivePropertyProviderFactory = new 
AESSensitivePropertyProviderFactory(keyHex);
    --- End diff --
    
    It will if two competing resources are attempting to access it, but this 
scenario should not occur (there should not be two resources with different 
keys trying to load the data in the real application, as there is only one 
master key). The reason it was failing in your original test was due to 
sequential access not being cleared after migration. If we are concerned about 
race conditions, this should not be `static` at all and more of the 
organization needs to change. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to