{"record":{"id":"d6aa82bb5b0495f3","repo":"apache/druid","slug":"base-sequence-names-do-not-match-for-the-tasks-in","errorCode":null,"errorMessage":"Base sequence names do not match for the tasks in the task group with ID [%s]","messagePattern":"Base sequence names do not match for the tasks in the task group with ID \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java","lineNumber":3063,"sourceCode":"    String taskGroupSequenceName = activelyReadingTaskGroups.get(groupId).baseSequenceName;\n    boolean allSequenceNamesMatch =\n        activelyReadingTaskGroups.get(groupId)\n            .tasks\n            .keySet()\n            .stream()\n            .map(x -> {\n              Optional<Task> taskOptional = taskStorage.getTask(x);\n              if (!taskOptional.isPresent() || !doesTaskMatchSupervisor(taskOptional.get())) {\n                return false;\n              }\n              @SuppressWarnings(\"unchecked\")\n              SeekableStreamIndexTask<PartitionIdType, SequenceOffsetType, RecordType> task =\n                  (SeekableStreamIndexTask<PartitionIdType, SequenceOffsetType, RecordType>) taskOptional.get();\n              return task.getIOConfig().getBaseSequenceName();\n            })\n            .allMatch(taskSeqName -> taskSeqName.equals(taskGroupSequenceName));\n    if (!allSequenceNamesMatch) {\n      throw new ISE(\n          \"Base sequence names do not match for the tasks in the task group with ID [%s]\",\n          groupId\n      );\n    }\n  }\n\n  private ListenableFuture<Void> stopTask(final String id, final boolean publish)\n  {\n    return Futures.transform(\n        taskClient.stopAsync(id, publish), new Function<>()\n        {\n          @Nullable\n          @Override\n          public Void apply(@Nullable Boolean result)\n          {\n            if (result == null || !result) {\n              log.info(\"Killing task[%s] as it failed to stop in a timely manner.\", id);\n              killTask(id, \"Failed to stop in a timely manner\");","sourceCodeStart":3045,"sourceCodeEnd":3081,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java#L3045-L3081","documentation":"Within a task group all replica tasks must share the same base sequence name so they read the same segments and can be swapped in atomically. The supervisor collects getBaseSequenceName() from every task in the group and throws IllegalStateException if they disagree, since inconsistent replicas would publish divergent data.","triggerScenarios":"During task-group validation (e.g. before changing offsets or killing/restarting a group) when tasks in one group were created at different times or by different supervisor generations and thus got different base sequence names.","commonSituations":"Supervisor restarted mid-rolling-update leaving mixed-generation tasks in a group; manual task manipulation or task failure and recreation racing a supervisor lifecycle change; bugs in custom task provisioning.","solutions":["Restart the supervisor so it rebuilds task groups with consistent tasks.","Check task logs to identify the odd task and kill it (POST /druid/indexer/v1/supervisor/<id>/terminate or task shutdown endpoint) letting the supervisor create a fresh replica.","If groups are persistently inconsistent, reset the supervisor and resume from saved offsets.","Upgrade Druid if this recurs during rolling restarts; several sequence-name race fixes landed over time."],"exampleFix":"// before: manually resubmitting only one replica task, leaving mixed sequences\n// after: suspend, then resume the supervisor so all replicas are recreated together\ncurl -X POST .../druid/indexer/v1/supervisor/<id>/suspend\ncurl -X POST .../druid/indexer/v1/supervisor/<id>/resume","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { supervisorLifecycleOp(); } catch (ISE e) { if (e.getMessage().contains(\"Base sequence names do not match\")) { suspendAndResumeSupervisor(); } }","preventionTips":["Avoid killing/recreating individual replica tasks manually","Use suspend/resume instead of partial task manipulation","Keep supervisor versions homogeneous during rolling upgrades"],"tags":["druid","supervisor","task-group","consistency"],"backgroundTag":"internal-invariant-violation","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}