[ 
https://issues.apache.org/jira/browse/GEODE-4029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16271914#comment-16271914
 ] 

ASF GitHub Bot commented on GEODE-4029:
---------------------------------------

PurelyApplied commented on a change in pull request #1103: GEODE-4029: Deployed 
jars may not be correct when multiple locators a…
URL: https://github.com/apache/geode/pull/1103#discussion_r153958783
 
 

 ##########
 File path: 
geode-core/src/main/java/org/apache/geode/management/internal/configuration/callbacks/ConfigurationChangeListener.java
 ##########
 @@ -41,48 +41,42 @@ public 
ConfigurationChangeListener(ClusterConfigurationService sharedConfig) {
     this.sharedConfig = sharedConfig;
   }
 
+  // Don't process the event locally. The action of adding or removing a jar 
should already have
+  // been performed by DeployCommand or UndeployCommand.
   @Override
   public void afterUpdate(EntryEvent<String, Configuration> event) {
     super.afterUpdate(event);
-    addOrRemoveJarFromFilesystem(event);
+    if (event.isOriginRemote()) {
+      addOrRemoveJarFromFilesystem(event);
+    }
   }
 
   @Override
   public void afterCreate(EntryEvent<String, Configuration> event) {
     super.afterCreate(event);
-    addOrRemoveJarFromFilesystem(event);
+    if (event.isOriginRemote()) {
+      addOrRemoveJarFromFilesystem(event);
+    }
   }
 
-  // when a new jar is added, if it does not exist in the current locator, 
download it from
-  // another locator.
-  // when a jar is removed, if it exists in the current locator, remove it.
+  // Here we first remove any jars which are not used anymore and then we 
re-add all of the
+  // necessary jars again. This may appear a bit blunt but it also accounts 
for the situation
+  // where a jar is only being updated - i.e. the name does not change, only 
the content.
   private void addOrRemoveJarFromFilesystem(EntryEvent<String, Configuration> 
event) {
     String group = event.getKey();
     Configuration newConfig = (Configuration) event.getNewValue();
 
 Review comment:
   These casts appear unnecessary.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Deployed jars may not be correct when multiple locators are in use
> ------------------------------------------------------------------
>
>                 Key: GEODE-4029
>                 URL: https://issues.apache.org/jira/browse/GEODE-4029
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Jens Deppe
>            Assignee: Jens Deppe
>
> When we have more than one locator, if a jar is re-deployed it will not be 
> propagated correctly to the 'remote' locators. i.e. the locators which are 
> not directly executing the 'deploy' command.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to