{"record":{"id":"0c3f254252188c94","repo":"apache/seatunnel","slug":"rediserrorcode-03","errorCode":"RedisErrorCode-03","errorMessage":"Failed to get the write response","messagePattern":"Failed to get the write response","errorType":"error_code","errorClass":"RedisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/client/RedisSingleClient.java","lineNumber":288,"sourceCode":"            String cursor, ScanParams scanParams, RedisDataType type) {\n\n        if (type == null) {\n            // redis 5\n            return jedis.scan(cursor, scanParams);\n        } else {\n            // redis 7\n            return jedis.scan(cursor, scanParams, type.name());\n        }\n    }\n\n    private void processResponses(List<Response<?>> responseList) {\n        try {\n            for (Response<?> response : responseList) {\n                // If the response is an exception object, it will be thrown\n                response.get();\n            }\n        } catch (JedisException e) {\n            throw new RedisConnectorException(RedisErrorCode.GET_RESPONSE_FAILED, e);\n        }\n    }\n}\n","sourceCodeStart":270,"sourceCodeEnd":292,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/client/RedisSingleClient.java#L270-L292","documentation":"Thrown by RedisSingleClient.processResponses after a pipelined batch write: each queued Response.get() may surface a JedisException (stored by the pipeline), and if any does, it is wrapped as RedisConnectorException with code GET_RESPONSE_FAILED. It means one or more commands in the batch write failed.","triggerScenarios":"batchWriteString/batchWriteList/batchWriteSet/batchWriteHash/batchWriteZset call processResponses, and a pipelined command fails — connection dropped mid-pipeline, OOM on the server, WRONGTYPE, or read timeout on response.get().","commonSituations":"Redis server memory limit (maxmemory) rejecting writes; writing a value with the wrong type for an existing key (WRONGTYPE); network instability between the SeaTunnel worker and Redis; pipeline batches too large causing timeouts.","solutions":["Check the wrapped JedisException message for the actual server error (WRONGTYPE, OOM command not allowed, connection reset)","Fix key type conflicts — ensure existing keys match the target type or delete/flush conflicting keys before writing","Increase Redis maxmemory or add eviction policy if writes fail with OOM","Reduce pipeline batch size and socket timeouts to avoid timeouts on large batches","Verify network stability and Redis server logs for errors at the failure time"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before batch write: check key type matches\nString t = jedis.type(key);\nif (!expectedType.equals(t) && !\"none\".equals(t)) { throw new IllegalStateException(\"WRONGTYPE for \" + key); }","typeGuard":null,"tryCatchPattern":"try { client.batchWriteHash(map); } catch (RedisConnectorException e) {\n  if (e.getCause() instanceof JedisException je && je.getMessage().contains(\"WRONGTYPE\")) { /* fix key type or rename keys */ }\n  // OOM: reduce batch / raise maxmemory; connection: retry with backoff\n}","preventionTips":["Check INFO memory / maxmemory before large bulk writes","Verify existing key types before writing (TYPE command)","Keep pipeline batches modest (hundreds, not tens of thousands)","Monitor Redis server logs and connection health"],"tags":["redis","pipeline","write","jedis"],"backgroundTag":"database-write-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}