apache/dolphinscheduler · warning · ServiceException
NEED_NOT_UPDATE_QUEUE
NEED_NOT_UPDATE_QUEUE
Error message
NEED_NOT_UPDATE_QUEUE: queue need not update
What it means
NEED_NOT_UPDATE_QUEUE is thrown by updateQueueValid() when Objects.equals(existsQueue, updateQueue) is true — the update payload is identical to the stored queue. The service refuses a no-op update. It is a guard against pointless writes, not a data problem.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java:97
throw new ServiceException(Status.QUEUE_VALUE_EXIST, queue.getQueue());
} else if (checkQueueNameExist(queue.getQueueName())) {
throw new ServiceException(Status.QUEUE_NAME_EXIST, queue.getQueueName());
}
}
/**
* Check queue update object valid or not
*
* @param existsQueue The exists queue object
* @param updateQueue The queue object want to update
*/
private void updateQueueValid(Queue existsQueue, Queue updateQueue) throws ServiceException {
// Check the exists queue and the necessary of update operation, in not exist checker have to use updateQueue to
// avoid NPE
if (Objects.isNull(existsQueue)) {
throw new ServiceException(Status.QUEUE_NOT_EXIST, updateQueue.getQueue());
} else if (Objects.equals(existsQueue, updateQueue)) {
throw new ServiceException(Status.NEED_NOT_UPDATE_QUEUE);
}
// Check the update queue parameters
else if (StringUtils.isEmpty(updateQueue.getQueue())) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE);
} else if (StringUtils.isEmpty(updateQueue.getQueueName())) {
throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE_NAME);
} else if (!Objects.equals(updateQueue.getQueue(), existsQueue.getQueue())
&& checkQueueExist(updateQueue.getQueue())) {
throw new ServiceException(Status.QUEUE_VALUE_EXIST, updateQueue.getQueue());
} else if (!Objects.equals(updateQueue.getQueueName(), existsQueue.getQueueName())
&& checkQueueNameExist(updateQueue.getQueueName())) {
throw new ServiceException(Status.QUEUE_NAME_EXIST, updateQueue.getQueueName());
}
}
/**
* query queue list
*View on GitHub (pinned to 02eac45a1b)
Solutions
- Change at least one field before updating
- Skip the update call when the new values equal the current ones
- Catch the exception and treat it as success in idempotent workflows
Example fix
// before
queueService.updateQueue(loginUser, id, existing.getQueue(), existing.getQueueName());
// after
if (!Objects.equals(existing.getQueue(), newQueue) || !Objects.equals(existing.getQueueName(), newQueueName)) {
queueService.updateQueue(loginUser, id, newQueue, newQueueName);
} Defensive patterns
Strategy: validation
Validate before calling
if (Objects.equals(existing, updateCandidate)) {
return; // no-op, skip the update call entirely
} Try / catch
try {
queueService.updateQueue(loginUser, id, queue, queueName);
} catch (ServiceException e) {
if (e.getCode() == Status.NEED_NOT_UPDATE_QUEUE.getCode()) { return; /* idempotent success */ }
throw e;
} Prevention
- Compare desired vs current state before updating
- Treat no-op updates as success in idempotent automation
- Avoid resubmitting unchanged forms
When it happens
Trigger: Submitting an update form without changing any field; automation re-applying the same desired state each run; retrying an update that already succeeded.
Common situations: Idempotent config-management scripts (Ansible/Terraform-style) hitting an API that does not treat no-op as success; double-clicking Save in the UI.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- QUEUE_NOT_EXIST
- TASK_GROUP_QUEUE_ALREADY_START
- REQUEST_PARAMS_NOT_VALID_ERROR
- QUEUE_VALUE_EXIST
- QUEUE_NAME_EXIST
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/61b15db6f1eccdde.
Report an issue: GitHub.