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

(Updated Sept. 28, 2015, 11:36 p.m.)


Review request for geode and Darrel Schneider.


Changes
-------

initialize() did set connected=true. But disconnect() set the 
disconnecting=true. 

In IDS.isConnect(), there're following code:
    if (this.isDisconnecting) {
      return false;
    }
    return this.isConnected;

So, the "while" in following code will never enter. 
-          if (existingSystem.isDisconnecting()) {
-            while (existingSystem.isConnected()) {
i.e. the wait(500) was never called. Anyway, even the wait(500) is never 
called, in old code, there's chance to create 2 instances(current thread found 
a disconnecting one, it goes ahead to create a new one. Then the thread2 will 
find 2 ds)

With our latest code change, the wait(50) will really take effect.


Bugs: geode-329
    https://issues.apache.org/jira/browse/geode-329


Repository: geode


Description
-------

There's a race conditition that 2 DS will be created when the current DS is 
disconnecting.


Diffs (updated)
-----

  
gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
 b7b2cd8 

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


Testing
-------

precheckin


Thanks,

xiaojian zhou

Reply via email to