| | |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return new String("[ Entry count=" + this.entryCount + |
| | | ", Entry left count=" + this.entryLeftCount + "]"); |
| | | return "[ Entry count=" + this.entryCount + |
| | | ", Entry left count=" + this.entryLeftCount + "]"; |
| | | } |
| | | |
| | | /** |
| | |
| | | throws DirectoryException |
| | | { |
| | | DirectoryException exportRootException = null; |
| | | boolean contextAcquired = false; |
| | | |
| | | // Acquire and initialize the export context |
| | | acquireIEContext(false); |
| | | contextAcquired = true; |
| | | |
| | | // We manage the list of servers to initialize in order : |
| | | // - to test at the end that all expected servers have reconnected |
| | |
| | | ieContext.failureList.toString())); |
| | | } |
| | | |
| | | if (contextAcquired) |
| | | releaseIEContext(); |
| | | // Don't forget to release IEcontext acquired at beginning. |
| | | releaseIEContext(); |
| | | |
| | | String cause = exportRootException != null ? exportRootException |
| | | .getLocalizedMessage() : ""; |
| | |
| | | TRACER.debugInfo( |
| | | "[IE] wait for start replicasWeAreWaitingFor=" + replicasWeAreWaitingFor); |
| | | |
| | | boolean done = true; |
| | | boolean done; |
| | | do |
| | | { |
| | | done = true; |
| | |
| | | while ((!done) && (waitResultAttempt<1200) // 2mn |
| | | && (!broker.shuttingDown())); |
| | | |
| | | // Add to the failure list the servers that were here at start time but |
| | | // that never ended with the right generationId. |
| | | for (Integer sid : replicasWeAreWaitingFor.toArray(new Integer[0])) |
| | | ieContext.failureList.add(sid); |
| | | ieContext.failureList.addAll( |
| | | Arrays.asList(replicasWeAreWaitingFor.toArray(new Integer[0]))); |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo( |
| | |
| | | for (DSInfo dsi : getReplicasList()) |
| | | replicasWeAreWaitingFor.add(dsi.getDsId()); |
| | | |
| | | boolean done = true; |
| | | boolean done; |
| | | do |
| | | { |
| | | done = true; |
| | |
| | | continue; |
| | | } |
| | | |
| | | DSInfo dsInfo = null; |
| | | dsInfo = isRemoteDSConnected(serverId); |
| | | DSInfo dsInfo = isRemoteDSConnected(serverId); |
| | | if (dsInfo == null) |
| | | { |
| | | // this server is disconnected |
| | |
| | | } |
| | | while ((!done) && (!broker.shuttingDown())); // infinite wait |
| | | |
| | | // Add to the failure list the servers that were here at start time but |
| | | // that never ended with the right generationId. |
| | | for (Integer sid : replicasWeAreWaitingFor.toArray(new Integer[0])) |
| | | ieContext.failureList.add(sid); |
| | | ieContext.failureList.addAll( |
| | | Arrays.asList(replicasWeAreWaitingFor.toArray(new Integer[0]))); |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo( |
| | |
| | | ieContext.setException(new DirectoryException(ResultCode.OTHER, |
| | | ERR_INIT_HEARTBEAT_LOST_DURING_EXPORT.get( |
| | | Integer.toString(ieContext.getSlowestServer())))); |
| | | // .. and abandon the export by throwing an exception. |
| | | IOException ioe = |
| | | new IOException("IOException with nested DirectoryException"); |
| | | ioe.initCause(ieContext.getException()); |
| | | throw ioe; |
| | | |
| | | throw new IOException("IOException with nested DirectoryException", |
| | | ieContext.getException()); |
| | | } |
| | | |
| | | int ourLastExportedCnt = ieContext.msgCnt; |
| | |
| | | "Server id " + serverID + " and domain " + serviceID |
| | | + " resetGenerationId " + generationIdNewValue); |
| | | |
| | | ResetGenerationIdMsg genIdMessage = null; |
| | | ResetGenerationIdMsg genIdMessage; |
| | | |
| | | if (generationIdNewValue == null) |
| | | { |