@Override public Integer checkSyncProgress(URI storage, URI source, URI target, String opId) { try { StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage); Controller controller = lookupDeviceController(storageSystem); BlockController blkcontroller = (BlockController) controller; return blkcontroller.checkSyncProgress(storage, source, target, opId); } catch (RetryableDatabaseException e) { if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) { // netflix curator ConnectionException is not serializable // and thus should not be sent back to rmi client. _log.error("Failed to queue task due to dbsvc disconnected. Error: {}", e.getMessage()); _log.error(e.getMessage(), e); throw DatabaseException.retryables.connectionFailed(); } throw e; } }
@Override public void activateFullCopy(URI storage, List<URI> fullCopy, String opId) { try { // Direct RMI call to expedite this call without any potential distribute-Q delay StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage); Controller controller = lookupDeviceController(storageSystem); BlockController blkcontroller = (BlockController) controller; blkcontroller.activateFullCopy(storage, fullCopy, opId); } catch (RetryableDatabaseException e) { if (e.getServiceCode() == ServiceCode.DBSVC_CONNECTION_ERROR) { // netflix curator ConnectionException is not serializable // and thus should not be sent back to rmi client. _log.error("Failed to queue task due to dbsvc disconnected. Error: {}", e.getMessage()); _log.error(e.getMessage(), e); throw DatabaseException.retryables.connectionFailed(); } throw e; } }