{"record":{"id":"4f011d43e0a728bd","repo":"apache/flink","slug":"exhausted-all-job-ids-for-job-name-s","errorCode":null,"errorMessage":"Exhausted all job IDs for job name: %s","messagePattern":"Exhausted all job IDs for job name: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"flink-clients/src/main/java/org/apache/flink/client/program/JobNameBasedJobIdManager.java","lineNumber":167,"sourceCode":"        if (firstJobName == null) {\n            firstJobName = jobName;\n            assignedJobId = baseJobId;\n        } else {\n            int initialIndex = getInitialIndex(jobName);\n            int step = 0;\n            while (true) {\n                // the calculated index may overflow and wrap around\n                int candidateIndex = initialIndex + step;\n                JobID candidateId = fromJobIndex(candidateIndex, baseJobId);\n                if (!occupiedJobIds.contains(candidateId)) {\n                    assignedJobId = candidateId;\n                    break;\n                }\n\n                // the step may overflow and wrap around\n                step++;\n                if (step == 0) {\n                    throw new IllegalStateException(\n                            String.format(\"Exhausted all job IDs for job name: %s\", jobName));\n                }\n            }\n        }\n        streamGraph.setJobId(assignedJobId);\n        occupiedJobIds.add(assignedJobId);\n    }\n\n    @VisibleForTesting\n    String getFirstJobName() {\n        return firstJobName;\n    }\n\n    @VisibleForTesting\n    int getInitialIndex(String jobName) {\n        checkNotNull(firstJobName);\n\n        return jobName.equals(firstJobName) ? 0 : jobName.hashCode();","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-clients/src/main/java/org/apache/flink/client/program/JobNameBasedJobIdManager.java#L149-L185","documentation":"Error \"Exhausted all job IDs for job name: %s\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Exhausted all job IDs for job name: the reported value.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Exhausted all job IDs for job name: the reported value.","solutions":["Address the cause reported by the error message: Exhausted all job IDs for job name: the reported value","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Exhausted all job IDs for job name: the reported value\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}