{"record":{"id":"348245390f553af0","repo":"apache/druid","slug":"milliseconds-d-is-out-of-range-of-int","errorCode":null,"errorMessage":"Milliseconds %d is out of range of int","messagePattern":"Milliseconds (.+?) is out of range of int","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheConfig.java","lineNumber":90,"sourceCode":"\n    /**\n     * kept for test cases only\n     */\n    @VisibleForTesting\n    DurationConfig(long milliseconds)\n    {\n      this.milliseconds = milliseconds;\n    }\n\n    public long getMilliseconds()\n    {\n      return milliseconds;\n    }\n\n    public int getMillisecondsAsInt()\n    {\n      if (milliseconds > Integer.MAX_VALUE) {\n        throw new ISE(\"Milliseconds %d is out of range of int\", milliseconds);\n      }\n      return (int) milliseconds;\n    }\n\n    public long getSeconds()\n    {\n      return milliseconds / 1000;\n    }\n  }\n\n  /**\n   * host of a standalone mode redis\n   */\n  @JsonProperty\n  private String host;\n\n  /**\n   * port of a standalone mode redis","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheConfig.java#L72-L108","documentation":"RedisCacheConfig.DurationConfig.getMillisecondsAsInt found the configured duration exceeds Integer.MAX_VALUE milliseconds, so it cannot fit the int that Jedis configuration requires. This means an implausibly large expiry/TTL value was configured (over ~24.8 days in milliseconds).","triggerScenarios":"Thrown at extensions-contrib/redis-cache/src/main/java/org/apache/druid/client/cache/RedisCacheConfig.java:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the configured duration (e.g. druid.cache.expiration) to at most Integer.MAX_VALUE milliseconds.","Express very long expirations in seconds via the corresponding seconds-based accessors if available.","Add validation at config load time so out-of-range durations are rejected early with a clear message."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}