{"record":{"id":"42c02845b5ce3a24","repo":"apache/flink","slug":"job-id-s-is-not-derived-from-the-base-job-id-s","errorCode":null,"errorMessage":"Job ID %s is not derived from the base job ID %s.","messagePattern":"Job ID (.+?) is not derived from the base job ID (.+?)\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-clients/src/main/java/org/apache/flink/client/program/JobNameBasedJobIdManager.java","lineNumber":220,"sourceCode":"    /**\n     * Computes the index of the given job ID relative to the base job ID.\n     *\n     * <p>This method correctly calculates the index even when the lower and upper parts of the job\n     * ID have wrapped around due to overflow.\n     *\n     * @param jobId the job ID to derive the index from\n     * @param baseId the base job ID\n     * @return the index of the given job ID relative to the base job ID\n     */\n    @VisibleForTesting\n    static int getJobIndex(JobID jobId, JobID baseId) {\n        long lowerDiff = jobId.getLowerPart() - baseId.getLowerPart();\n        long upperDiff = jobId.getUpperPart() - baseId.getUpperPart();\n\n        if (lowerDiff != upperDiff\n                || lowerDiff < Integer.MIN_VALUE\n                || lowerDiff > Integer.MAX_VALUE) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Job ID %s is not derived from the base job ID %s.\", jobId, baseId));\n        }\n\n        return (int) lowerDiff;\n    }\n\n    /**\n     * Creates a comparator for sorting job IDs based on their logical position relative to an\n     * initial index, supporting circular sequence number semantics.\n     *\n     * <p>This comparator handles the case where job indices may have wrapped around due to overflow\n     * by treating the difference as an unsigned 32-bit value. This allows proper ordering of job\n     * IDs even when their indices span across the boundary where signed integers would overflow.\n     *\n     * @param initialIndex the starting index used as reference point for calculating logical\n     *     offsets\n     * @return a comparator that sorts job IDs by their calculated unsigned offset from the initial","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-clients/src/main/java/org/apache/flink/client/program/JobNameBasedJobIdManager.java#L202-L238","documentation":"Error \"Job ID %s is not derived from the base job ID %s.\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Job ID the reported value is not derived from the base job ID the reported value.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Job ID the reported value is not derived from the base job ID the reported value.","solutions":["Address the cause reported by the error message: Job ID the reported value is not derived from the base job ID the reported value.","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Job ID the reported value is not derived from the base job ID 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"}