{"record":{"id":"3c073a13363a453c","repo":"apache/druid","slug":"druid-coordinator-kill-s-period-s-must-be-gre","errorCode":null,"errorMessage":"'druid.coordinator.kill.%s.period'[%s] must be greater than 'druid.coordinator.period.metadataStoreManagementPeriod'[%s]","messagePattern":"'druid\\.coordinator\\.kill\\.(.+?)\\.period'\\[(.+?)\\] must be greater than 'druid\\.coordinator\\.period\\.metadataStoreManagementPeriod'\\[(.+?)\\]","errorType":"validation","errorClass":"DruidException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/server/coordinator/config/DruidCoordinatorConfig.java","lineNumber":128,"sourceCode":"    if (killUnusedConfig.getMaxSegments() < 0) {\n      throw newInvalidInputExceptionForOperator(\n          \"'druid.coordinator.kill.maxSegments'[%s] must be a positive integer.\",\n          killUnusedConfig.getMaxSegments()\n      );\n    }\n  }\n\n  private void validateKillConfig(MetadataCleanupConfig config, String propertyPrefix)\n  {\n    if (!config.isCleanupEnabled()) {\n      // Do not perform validation if cleanup is disabled\n      return;\n    }\n\n    final Duration metadataManagementPeriod = getCoordinatorMetadataStoreManagementPeriod();\n    final Duration period = config.getCleanupPeriod();\n    if (period == null || period.getMillis() < metadataManagementPeriod.getMillis()) {\n      throw newInvalidInputExceptionForOperator(\n          \"'druid.coordinator.kill.%s.period'[%s] must be greater than\"\n          + \" 'druid.coordinator.period.metadataStoreManagementPeriod'[%s]\",\n          propertyPrefix, period, metadataManagementPeriod\n      );\n    }\n\n    final Duration retainDuration = config.getDurationToRetain();\n    if (retainDuration == null || retainDuration.getMillis() < 0) {\n      throw newInvalidInputExceptionForOperator(\n          \"'druid.coordinator.kill.%s.durationToRetain'[%s] must be 0 milliseconds or higher\",\n          propertyPrefix, retainDuration\n      );\n    }\n    if (retainDuration.getMillis() > System.currentTimeMillis()) {\n      throw newInvalidInputExceptionForOperator(\n          \"'druid.coordinator.kill.%s.durationToRetain'[%s] cannot be greater than current time in milliseconds\",\n          propertyPrefix, retainDuration\n      );","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/server/coordinator/config/DruidCoordinatorConfig.java#L110-L146","documentation":"validateKillConfig() (applied per kill target such as unusedSegments, pendingSegments, segments meta schemas) enforces that each druid.coordinator.kill.<type>.period is strictly greater than druid.coordinator.period.metadataStoreManagementPeriod, because these cleanup duties are scheduled relative to that management period. A missing period, or one less than/equal to the management period, is rejected as invalid operator input.","triggerScenarios":"Coordinator startup where any kill config's cleanupPeriod is null or its millis < metadataStoreManagementPeriod millis, e.g. druid.coordinator.kill.pendingSegments.period=PT1H while druid.coordinator.period.metadataStoreManagementPeriod=PT2H.","commonSituations":"Setting per-type kill periods independently without checking metadataStoreManagementPeriod; upgrading Druid where the metadataStoreManagementPeriod default changed; copy-pasting kill configs from clusters with different management periods.","solutions":["Set druid.coordinator.kill.<type>.period strictly greater than druid.coordinator.period.metadataStoreManagementPeriod (e.g. management PT1H, kill period P1D)","Or lower druid.coordinator.period.metadataStoreManagementPeriod below the desired kill period","Restart the Coordinator after updating runtime.properties"],"exampleFix":"// before\ndruid.coordinator.period.metadataStoreManagementPeriod=PT2H\ndruid.coordinator.kill.pendingSegments.period=PT1H\n// after\ndruid.coordinator.period.metadataStoreManagementPeriod=PT1H\ndruid.coordinator.kill.pendingSegments.period=P1D","handlingStrategy":"validation","validationCode":"final Period mgmt = Period.parse(props.getProperty(\"druid.coordinator.period.metadataStoreManagementPeriod\", \"P1D\"));\nfor (String type : List.of(\"unusedSegments\", \"pendingSegments\", \"segmentSchema\")) {\n  String p = props.getProperty(\"druid.coordinator.kill.\" + type + \".period\");\n  if (p != null && Period.parse(p).toStandardDuration().getMillis() <= mgmt.toStandardDuration().getMillis()) {\n    throw new IllegalArgumentException(type + \" kill period must be greater than metadataStoreManagementPeriod\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  coordinator.start();\n} catch (Exception e) {\n  if (String.valueOf(e.getMessage()).contains(\"metadataStoreManagementPeriod\")) {\n    // raise the offending druid.coordinator.kill.<type>.period and restart\n  }\n}","preventionTips":["Check every druid.coordinator.kill.<type>.period against metadataStoreManagementPeriod on upgrade","Treat metadataStoreManagementPeriod as the scheduling base for all kill duties","Prefer daily (P1D) kill periods with default management period","Validate coordinator runtime.properties in CI before rollout"],"tags":["coordinator","configuration","validation","startup"],"backgroundTag":"invalid-config-value","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"}