{"record":{"id":"61b15db6f1eccdde","repo":"apache/dolphinscheduler","slug":"need-not-update-queue","errorCode":"NEED_NOT_UPDATE_QUEUE","errorMessage":"NEED_NOT_UPDATE_QUEUE: queue need not update","messagePattern":"NEED_NOT_UPDATE_QUEUE: queue need not update","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"warning","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java","lineNumber":97,"sourceCode":"            throw new ServiceException(Status.QUEUE_VALUE_EXIST, queue.getQueue());\n        } else if (checkQueueNameExist(queue.getQueueName())) {\n            throw new ServiceException(Status.QUEUE_NAME_EXIST, queue.getQueueName());\n        }\n    }\n\n    /**\n     * Check queue update object valid or not\n     *\n     * @param existsQueue The exists queue object\n     * @param updateQueue The queue object want to update\n     */\n    private void updateQueueValid(Queue existsQueue, Queue updateQueue) throws ServiceException {\n        // Check the exists queue and the necessary of update operation, in not exist checker have to use updateQueue to\n        // avoid NPE\n        if (Objects.isNull(existsQueue)) {\n            throw new ServiceException(Status.QUEUE_NOT_EXIST, updateQueue.getQueue());\n        } else if (Objects.equals(existsQueue, updateQueue)) {\n            throw new ServiceException(Status.NEED_NOT_UPDATE_QUEUE);\n        }\n        // Check the update queue parameters\n        else if (StringUtils.isEmpty(updateQueue.getQueue())) {\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE);\n        } else if (StringUtils.isEmpty(updateQueue.getQueueName())) {\n            throw new ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR, Constants.QUEUE_NAME);\n        } else if (!Objects.equals(updateQueue.getQueue(), existsQueue.getQueue())\n                && checkQueueExist(updateQueue.getQueue())) {\n            throw new ServiceException(Status.QUEUE_VALUE_EXIST, updateQueue.getQueue());\n        } else if (!Objects.equals(updateQueue.getQueueName(), existsQueue.getQueueName())\n                && checkQueueNameExist(updateQueue.getQueueName())) {\n            throw new ServiceException(Status.QUEUE_NAME_EXIST, updateQueue.getQueueName());\n        }\n    }\n\n    /**\n     * query queue list\n     *","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/QueueServiceImpl.java#L79-L115","documentation":"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.","triggerScenarios":"Submitting an update form without changing any field; automation re-applying the same desired state each run; retrying an update that already succeeded.","commonSituations":"Idempotent config-management scripts (Ansible/Terraform-style) hitting an API that does not treat no-op as success; double-clicking Save in the UI.","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"],"exampleFix":"// before\nqueueService.updateQueue(loginUser, id, existing.getQueue(), existing.getQueueName());\n// after\nif (!Objects.equals(existing.getQueue(), newQueue) || !Objects.equals(existing.getQueueName(), newQueueName)) {\n    queueService.updateQueue(loginUser, id, newQueue, newQueueName);\n}","handlingStrategy":"validation","validationCode":"if (Objects.equals(existing, updateCandidate)) {\n    return; // no-op, skip the update call entirely\n}","typeGuard":null,"tryCatchPattern":"try {\n    queueService.updateQueue(loginUser, id, queue, queueName);\n} catch (ServiceException e) {\n    if (e.getCode() == Status.NEED_NOT_UPDATE_QUEUE.getCode()) { return; /* idempotent success */ }\n    throw e;\n}","preventionTips":["Compare desired vs current state before updating","Treat no-op updates as success in idempotent automation","Avoid resubmitting unchanged forms"],"tags":["no-op","queue","update"],"backgroundTag":"invalid-state-transition","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}