You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/09/29 14:11:58 UTC

[GitHub] [geode] jvarenina commented on a change in pull request #6036: GEODE-8856: Persist gateway-sender state

jvarenina commented on a change in pull request #6036:
URL: https://github.com/apache/geode/pull/6036#discussion_r718557498



##########
File path: geode-wan/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderFactoryImpl.java
##########
@@ -271,10 +278,7 @@ public GatewaySender create(String id, int remoteDSId) {
       if (this.cache instanceof GemFireCacheImpl) {
         sender = new ParallelGatewaySenderImpl(cache, statisticsClock, attrs);
         this.cache.addGatewaySender(sender);
-
-        if (!this.attrs.isManualStart()) {
-          sender.start();
-        }
+        bringGatewaySenderToConfiguredState(sender);

Review comment:
       Thanks for the review!
   
   `bringGatewaySenderToConfiguredState` actually calls `getGatewaySenderDesiredState` function which takes into account the value of the `manual-start `and new `state` parameter when returning the desired state of gateway sender.
   
   New `state` parameter will now inter-work with` manual-start `in a following way:
   
   -   If `manual-start="true"` and `state` parameter is missing, then gateway sender
       will require manual start (this case has been improved, and it is explained in this PR description).
   
   -   if `manual-start` is not set (or "false") and `state` parameter is missing, then
       gateway sender will be started automatically (same as before).
   
   -   If parameter `state` is available in cluster configuration at startup,
       then gateway-sender will try to reach that state regardless of `manual-start`
       parameter value.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org