Source:
<code>private FutureTask<EventResult> submitTaskInternal(Event event, Callable<EventResult> callable) { FutureTask<EventResult> task = null; Guid storagePoolId = event.getStoragePoolId(); ReentrantLock lock = getPoolLock(storagePoolId); lock.lock(); try { Event currentEvent = poolCurrentEventMap.get(storagePoolId); if (currentEvent != null) { switch (currentEvent.getEventType()) { <START> case RECOVERY: <END> if (event.getEventType() == EventType.VDSCONNECTTOPOOL || event.getEventType() == EventType.VDSCLEARCACHE) { task = addTaskToQueue(event, callable, storagePoolId, isEventShouldBeFirst(event)); } else { log.debugFormat("Current event was skiped because of recovery is running now for pool {0}, event {1}", storagePoolId, event); } break; case RECONSTRUCT: if (event.getEventType() == EventType.VDSCONNECTTOPOOL || event.getEventType() == EventType.RECOVERY || event.getEventType() == EventType.DOMAINFAILOVER || event.getEventType() == EventType.VDSCLEARCACHE) { task = addTaskToQueue(event, callable, storagePoolId, isEventShouldBeFirst(event)); } else { log.debugFormat("Current event was skiped because of reconstruct is running now for pool {0}, event {1}", storagePoolId, event); } break; default: task = addTaskToQueue(event, callable, storagePoolId, isEventShouldBeFirst(event)); break; } } else { task = addTaskToQueue(event, callable, storagePoolId, false); poolCurrentEventMap.put(storagePoolId, event); ThreadPoolUtil.execute(new InternalEventQueueThread(storagePoolId, lock, poolsEventsMap, poolCurrentEventMap)); } } finally { lock.unlock(); } return task; }</code><technical_language>event.getEventType() == EventType.DOMAINFAILOVER added here. Now, I event run recovery run, I prefer safe side, especially cost</technical_language>

Target:
private FutureTask<EventResult> submitTaskInternal(Event event, Callable<EventResult> callable) { FutureTask<EventResult> task = null; Guid storagePoolId = event.getStoragePoolId(); ReentrantLock lock = getPoolLock(storagePoolId); lock.lock(); try { Event currentEvent = poolCurrentEventMap.get(storagePoolId); if (currentEvent != null) { switch (currentEvent.getEventType()) { case RECOVERY: if (event.getEventType() == EventType.VDSCONNECTTOPOOL || event.getEventType() == EventType.VDSCLEARCACHE || event.getEventType() == EventType.DOMAINFAILOVER) { task = addTaskToQueue(event, callable, storagePoolId, isEventShouldBeFirst(event)); } else { log.debugFormat("Current event was skiped because of recovery is running now for pool {0}, event {1}", storagePoolId, event); } break; case RECONSTRUCT: if (event.getEventType() == EventType.VDSCONNECTTOPOOL || event.getEventType() == EventType.RECOVERY || event.getEventType() == EventType.DOMAINFAILOVER || event.getEventType() == EventType.VDSCLEARCACHE) { task = addTaskToQueue(event, callable, storagePoolId, isEventShouldBeFirst(event)); } else { log.debugFormat("Current event was skiped because of reconstruct is running now for pool {0}, event {1}", storagePoolId, event); } break; default: task = addTaskToQueue(event, callable, storagePoolId, isEventShouldBeFirst(event)); break; } } else { task = addTaskToQueue(event, callable, storagePoolId, false); poolCurrentEventMap.put(storagePoolId, event); ThreadPoolUtil.execute(new InternalEventQueueThread(storagePoolId, lock, poolsEventsMap, poolCurrentEventMap)); } } finally { lock.unlock(); } return task; }