long backoff = retryCounter.getBackoffTimeAndIncrementAttempts(); LOG.warn("Received CLOSE for the region: {}, which we are already " + "trying to OPEN. try again after {}ms", encodedName, backoff);
/** * @return True if region is online and scannable else false if an error or shutdown (Otherwise * we just block in here holding up all forward-progess). */ private boolean isRegionOnline(RegionInfo ri) throws InterruptedException { RetryCounter rc = null; while (!isStopped()) { RegionState rs = this.assignmentManager.getRegionStates().getRegionState(ri); if (rs.isOpened()) { if (this.getServerManager().isServerOnline(rs.getServerName())) { return true; } } // Region is not OPEN. Optional<Procedure<MasterProcedureEnv>> optProc = this.procedureExecutor.getProcedures(). stream().filter(p -> p instanceof ServerCrashProcedure).findAny(); // TODO: Add a page to refguide on how to do repair. Have this log message point to it. // Page will talk about loss of edits, how to schedule at least the meta WAL recovery, and // then how to assign including how to break region lock if one held. LOG.warn("{} is NOT online; state={}; ServerCrashProcedures={}. Master startup cannot " + "progress, in holding-pattern until region onlined.", ri.getRegionNameAsString(), rs, optProc.isPresent()); // Check once-a-minute. if (rc == null) { rc = new RetryCounterFactory(1000).create(); } Threads.sleep(rc.getBackoffTimeAndIncrementAttempts()); } return false; }
long backoff = retryCounter.getBackoffTimeAndIncrementAttempts(); LOG.info( "Receiving OPEN for the region:{}, which we are trying to close, try again after {}ms",
RegionServerStartupResponse w = reportForDuty(); if (w == null) { long sleepTime = rc.getBackoffTimeAndIncrementAttempts(); LOG.warn("reportForDuty failed; sleeping {} ms and then retrying.", sleepTime); this.sleeper.sleep(sleepTime);