You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by xiaojian zhou <zh...@gmail.com> on 2016/04/25 08:01:04 UTC

Review Request 46625: when there're multiple cache servers on the same jvm, keep the first proxy for the each client

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46625/
-----------------------------------------------------------

Review request for geode and anilkumar gingade.


Bugs: GEODE-1183
    https://issues.apache.org/jira/browse/GEODE-1183


Repository: geode


Description
-------

Current API allows us to create 2 cache servers on the same JVM, then the client
    will try to create 2 queues to that JVM, one secondary and one primary.
    But the proxy is actually the same (since there's only one client), so the
    CCN keeps destroying and recreating the proxy.

    To fix, we will keep the first proxy and reject the duplicate creating.
    Then the secondary proxy will automatically become primary.


Diffs
-----

  geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java 1ba2294 
  geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java 8bf819c 

Diff: https://reviews.apache.org/r/46625/diff/


Testing
-------


Thanks,

xiaojian zhou


Re: Review Request 46625: when there're multiple cache servers on the same jvm, keep the first proxy for the each client

Posted by anilkumar gingade <ag...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46625/#review131437
-----------------------------------------------------------


Fix it, then Ship it!




Ship It!


geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/Simple2CacheServerDUnitTest.java (line 37)
<https://reviews.apache.org/r/46625/#comment195423>

    Do we need to extend "CacheClientNotifierDUnitTest"?
    
    Reason is when you run this test, it also runs all the tests from CacheClientNotifierDUnitTest, which is kind of duplicate....


- anilkumar gingade


On April 29, 2016, 4:04 p.m., xiaojian zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46625/
> -----------------------------------------------------------
> 
> (Updated April 29, 2016, 4:04 p.m.)
> 
> 
> Review request for geode and anilkumar gingade.
> 
> 
> Bugs: GEODE-1183
>     https://issues.apache.org/jira/browse/GEODE-1183
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Current API allows us to create 2 cache servers on the same JVM, then the client
>     will try to create 2 queues to that JVM, one secondary and one primary.
>     But the proxy is actually the same (since there's only one client), so the
>     CCN keeps destroying and recreating the proxy.
> 
>     To fix, we will keep the first proxy and reject the duplicate creating.
>     Then the secondary proxy will automatically become primary.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java 1ba2294 
>   geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java 8bf819c 
>   geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/Simple2CacheServerDUnitTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46625/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> xiaojian zhou
> 
>


Re: Review Request 46625: when there're multiple cache servers on the same jvm, keep the first proxy for the each client

Posted by xiaojian zhou <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46625/
-----------------------------------------------------------

(Updated April 29, 2016, 4:04 p.m.)


Review request for geode and anilkumar gingade.


Changes
-------

implemented review comments. 

add test for durable client.


Bugs: GEODE-1183
    https://issues.apache.org/jira/browse/GEODE-1183


Repository: geode


Description
-------

Current API allows us to create 2 cache servers on the same JVM, then the client
    will try to create 2 queues to that JVM, one secondary and one primary.
    But the proxy is actually the same (since there's only one client), so the
    CCN keeps destroying and recreating the proxy.

    To fix, we will keep the first proxy and reject the duplicate creating.
    Then the secondary proxy will automatically become primary.


Diffs (updated)
-----

  geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java 1ba2294 
  geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java 8bf819c 
  geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/Simple2CacheServerDUnitTest.java PRE-CREATION 

Diff: https://reviews.apache.org/r/46625/diff/


Testing
-------


Thanks,

xiaojian zhou


Re: Review Request 46625: when there're multiple cache servers on the same jvm, keep the first proxy for the each client

Posted by anilkumar gingade <ag...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46625/#review130480
-----------------------------------------------------------




geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java (line 510)
<https://reviews.apache.org/r/46625/#comment194214>

    Here, based on the stale-proxy we are trying to see whether to create new proxy or not...
    
    The isConnect() flag seems to be added for durable clients than non-durable...
    
    What if there is a stale proxy and its status is still connected?
    
    We also need to think about durable clients trying to connect to two servers in the same jvm (similar scenrio).
    
    The other solution could be:
    - While client is trying to make connection, if there is way to know the two servers are on the same jvm and ignore. OR If the endpoints are coming from locator, see locator can only return the server locations/connections that are not on the same jvm.
    - OR on the server side if the client is already connected with different port on this server (and there are multiple servers running on this JVM)


- anilkumar gingade


On April 25, 2016, 6:01 a.m., xiaojian zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46625/
> -----------------------------------------------------------
> 
> (Updated April 25, 2016, 6:01 a.m.)
> 
> 
> Review request for geode and anilkumar gingade.
> 
> 
> Bugs: GEODE-1183
>     https://issues.apache.org/jira/browse/GEODE-1183
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Current API allows us to create 2 cache servers on the same JVM, then the client
>     will try to create 2 queues to that JVM, one secondary and one primary.
>     But the proxy is actually the same (since there's only one client), so the
>     CCN keeps destroying and recreating the proxy.
> 
>     To fix, we will keep the first proxy and reject the duplicate creating.
>     Then the secondary proxy will automatically become primary.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java 1ba2294 
>   geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java 8bf819c 
> 
> Diff: https://reviews.apache.org/r/46625/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> xiaojian zhou
> 
>