{"record":{"id":"1e0b6cd629626dfa","repo":"redis/jedis","slug":"malformed-failing-over-push-content","errorCode":null,"errorMessage":"Malformed FAILING_OVER push: <content>","messagePattern":"Malformed FAILING_OVER push: <content>","errorType":"exception","errorClass":"MalformedMaintenanceEventException","httpStatus":null,"severity":"error","filePath":"src/main/java/redis/clients/jedis/MaintenancePushCodec.java","lineNumber":90,"sourceCode":"    // Explicit RESP3 null target => 'none' endpoint type (no remap). A byte[] target is parsed;\n    // anything else (wrong type, unparseable) is malformed.\n    HostAndPort target = c.get(3) == null ? null : parseHostPort(c, 3);\n    return new MovingEvent((Long) c.get(1), (Long) c.get(2), target);\n  }\n\n  private static MaintenanceEvent migrating(List<Object> c) { // [MIGRATING, seq, time_s, shards]\n    if (c.size() < 4 || !(c.get(1) instanceof Long) || !(c.get(2) instanceof Long)\n        || !(c.get(3) instanceof byte[])) {\n      throw malformed(\"MIGRATING\", c);\n    }\n    return new MigratingEvent((Long) c.get(1), (Long) c.get(2), shardIds(c, 3));\n  }\n\n  private static MaintenanceEvent failingOver(List<Object> c) { // [FAILING_OVER, seq, time_s,\n                                                                // shards]\n    if (c.size() < 4 || !(c.get(1) instanceof Long) || !(c.get(2) instanceof Long)\n        || !(c.get(3) instanceof byte[])) {\n      throw malformed(\"FAILING_OVER\", c);\n    }\n    return new FailingOverEvent((Long) c.get(1), (Long) c.get(2), shardIds(c, 3));\n  }\n\n  private static MaintenanceEvent migrated(List<Object> c) { // [MIGRATED, seq, shards]\n    if (c.size() < 3 || !(c.get(1) instanceof Long) || !(c.get(2) instanceof byte[])) {\n      throw malformed(\"MIGRATED\", c);\n    }\n    return new MigratedEvent((Long) c.get(1), shardIds(c, 2));\n  }\n\n  private static MaintenanceEvent failedOver(List<Object> c) { // [FAILED_OVER, seq, shards]\n    if (c.size() < 3 || !(c.get(1) instanceof Long) || !(c.get(2) instanceof byte[])) {\n      throw malformed(\"FAILED_OVER\", c);\n    }\n    return new FailedOverEvent((Long) c.get(1), shardIds(c, 2));\n  }\n","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/MaintenancePushCodec.java#L72-L108","documentation":"MaintenancePushCodec.failingOver() validates FAILING_OVER pushes, expecting [FAILING_OVER, Long seq, Long time_s, byte[] shards]. Deviations throw a malformed exception carrying the raw payload content, signaling the server sent a shape the client cannot decode.","triggerScenarios":"A FAILING_OVER push with <4 elements, non-Long seq/time_s, or non-byte[] shards arrives during a Redis Enterprise failover event.","commonSituations":"Failover events on clusters running different server/client schema versions; corrupted push streams; custom intermediaries; during rolling upgrades of the cluster.","solutions":["Match jedis version to your Redis Enterprise server version (upgrade the client).","Inspect the printed payload content to identify the schema drift and report it.","Bypass proxies that might reshape RESP push arrays.","After failover completes, verify the connection resubscribes and pushes parse normally."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"static boolean isValidFailingOver(List<Object> c) {\n  return c.size() >= 4 && c.get(1) instanceof Long && c.get(2) instanceof Long\n      && c.get(3) instanceof byte[];\n}","typeGuard":null,"tryCatchPattern":"try {\n  handle(codec.decode(push));\n} catch (JedisException e) {\n  log.warn(\"Dropping malformed FAILING_OVER push: {}\", e.getMessage());\n}","preventionTips":["Match client version to server push schema","Test failover events against your jedis version in staging","Avoid intermediaries that reshape RESP push arrays","Report persistent malformed payloads with the logged content to maintainers"],"tags":["redis","resp3","push","failover","parsing"],"backgroundTag":"unexpected-api-response-shape","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"}