{"record":{"id":"9f7def7abbc270af","repo":"redis/jedis","slug":"cluster-slots-have-holes","errorCode":null,"errorMessage":"Cluster slots have holes.","messagePattern":"Cluster slots have holes\\.","errorType":"exception","errorClass":"JedisClusterOperationException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/JedisClusterInfoCache.java","lineNumber":154,"sourceCode":"    if (slots.size() != Protocol.CLUSTER_HASHSLOTS) {\n      return false;\n    }\n    for (int i = 0; i < Protocol.CLUSTER_HASHSLOTS; ++i) {\n      if (i != slots.get(i)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  public void discoverClusterNodesAndSlots(Connection jedis) {\n    List<Object> slotsInfo = executeClusterSlots(jedis);\n    if (System.getProperty(INIT_NO_ERROR_PROPERTY) == null) {\n      if (slotsInfo.isEmpty()) {\n        throw new JedisClusterOperationException(\"Cluster slots list is empty.\");\n      }\n      if (!checkClusterSlotSequence(slotsInfo)) {\n        throw new JedisClusterOperationException(\"Cluster slots have holes.\");\n      }\n    }\n    w.lock();\n    try {\n      reset();\n      for (Object slotInfoObj : slotsInfo) {\n        List<Object> slotInfo = (List<Object>) slotInfoObj;\n\n        if (slotInfo.size() <= MASTER_NODE_INDEX) {\n          continue;\n        }\n\n        List<Integer> slotNums = getAssignedSlotArray(slotInfo);\n\n        // hostInfos\n        int size = slotInfo.size();\n        for (int i = MASTER_NODE_INDEX; i < size; i++) {\n          List<Object> hostInfos = (List<Object>) slotInfo.get(i);","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/JedisClusterInfoCache.java#L136-L172","documentation":"Thrown when CLUSTER SLOTS returns data whose slot sequence fails checkClusterSlotSequence — the 16384 hash slots are not covered contiguously (holes or gaps), so the client cannot build a complete slot map and key routing would be unreliable. Usually indicates a partially resharded or degraded cluster.","triggerScenarios":"Thrown at src/main/java/redis/clients/jedis/JedisClusterInfoCache.java:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Complete pending resharding operations so all 16384 slots are assigned (redis-cli cluster fix)","Check cluster_state and slot coverage with CLUSTER INFO / redis-cli cluster nodes","Retry discovery after the cluster finishes resharding or failover"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}