{"record":{"id":"92e1110f59d033e8","repo":"apache/druid","slug":"at-most-one-of-druid-broker-segment-watchedtiers","errorCode":null,"errorMessage":"At most one of 'druid.broker.segment.watchedTiers' and 'druid.broker.segment.ignoredTiers' can be configured.","messagePattern":"At most one of 'druid\\.broker\\.segment\\.watchedTiers' and 'druid\\.broker\\.segment\\.ignoredTiers' can be configured\\.","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/client/BrokerServerView.java","lineNumber":234,"sourceCode":"\n  public QueryableDruidServer.Maker getDruidClientFactory()\n  {\n    return druidClientFactory;\n  }\n\n  /**\n   * Validates the given BrokerSegmentWatcherConfig.\n   * <ul>\n   *   <li>At most one of watchedTiers or ignoredTiers can be set</li>\n   *   <li>If set, watchedTiers must be non-empty</li>\n   *   <li>If set, ignoredTiers must be non-empty</li>\n   * </ul>\n   */\n  private void validateSegmentWatcherConfig(BrokerSegmentWatcherConfig watcherConfig)\n  {\n    if (watcherConfig.getWatchedTiers() != null\n        && watcherConfig.getIgnoredTiers() != null) {\n      throw new ISE(\n          \"At most one of 'druid.broker.segment.watchedTiers' \"\n          + \"and 'druid.broker.segment.ignoredTiers' can be configured.\"\n      );\n    }\n\n    if (watcherConfig.getWatchedTiers() != null\n        && watcherConfig.getWatchedTiers().isEmpty()) {\n      throw new ISE(\"If configured, 'druid.broker.segment.watchedTiers' must be non-empty\");\n    }\n\n    if (watcherConfig.getIgnoredTiers() != null\n        && watcherConfig.getIgnoredTiers().isEmpty()) {\n      throw new ISE(\"If configured, 'druid.broker.segment.ignoredTiers' must be non-empty\");\n    }\n  }\n\n  private QueryableDruidServer addServer(DruidServer server)\n  {","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/client/BrokerServerView.java#L216-L252","documentation":"BrokerServerView.validateSegmentWatcherConfig() enforces that watchedTiers and ignoredTiers are mutually exclusive: the broker may either watch only listed tiers or ignore listed tiers, but configuring both is contradictory. It throws immediately when the BrokerSegmentWatcherConfig has both non-null.","triggerScenarios":"Setting both druid.broker.segment.watchedTiers and druid.broker.segment.ignoredTiers to non-null lists in broker runtime.properties (an empty string still yields a non-null list, which also triggers this).","commonSituations":"Copy-pasting both properties from example configs; merging config files that each set one of the properties; leaving watchedTiers= empty while also setting ignoredTiers.","solutions":["Remove one of the two properties from the broker config; keep only watchedTiers or only ignoredTiers.","If an empty property is unintentionally creating a non-null list, delete the property line rather than leaving it blank.","Restart the broker after updating runtime.properties."],"exampleFix":"// before\ndruid.broker.segment.watchedTiers=hot\ndruid.broker.segment.ignoredTiers=cold\n// after\ndruid.broker.segment.ignoredTiers=cold","handlingStrategy":"validation","validationCode":"boolean hasWatched = props.containsKey(\"druid.broker.segment.watchedTiers\");\nboolean hasIgnored = props.containsKey(\"druid.broker.segment.ignoredTiers\");\nif (hasWatched && hasIgnored) {\n  throw new IllegalStateException(\"Set only one of watchedTiers or ignoredTiers\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never set both druid.broker.segment.watchedTiers and ignoredTiers in the same config.","Validate broker runtime.properties in config-as-code CI.","Remove blank/empty property lines rather than leaving empty values.","Use config templates that express tier selection as a single exclusive choice."],"tags":["druid","broker","configuration","segment-tiers"],"backgroundTag":"mutually-exclusive-options","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"}