fix for 3315 : dsreplication initialize-all returns before peer has completed initialization
With this change the server code below dsreplication initialize-all
now uses the replication monitoring to make sure that all
replicas have completed the import before returning.
| | |
| | | throws DirectoryException |
| | | { |
| | | initializeRemote(target, serverID, initTask); |
| | | |
| | | if (target == RoutableMsg.ALL_SERVERS) |
| | | { |
| | | // Check for the status of all remote servers to check if they |
| | | // are all finished with the import. |
| | | boolean done = true; |
| | | do |
| | | { |
| | | done = true; |
| | | for (DSInfo dsi : getReplicasList()) |
| | | { |
| | | if (dsi.getStatus() == ServerStatus.FULL_UPDATE_STATUS) |
| | | { |
| | | done = false; |
| | | try |
| | | { |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) |
| | | { |
| | | // just loop again. |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | while (!done); |
| | | } |
| | | } |
| | | |
| | | /** |