You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bahir.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/04/07 11:25:00 UTC
[jira] [Commented] (BAHIR-247) Provide connection validation/idle
testing for Flink-Redis Connector
[ https://issues.apache.org/jira/browse/BAHIR-247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17316240#comment-17316240 ]
ASF subversion and git services commented on BAHIR-247:
-------------------------------------------------------
Commit b5c7e5d5061726df7667f29764ed01dfeda99861 in bahir-flink's branch refs/heads/master from yiksanchan
[ https://gitbox.apache.org/repos/asf?p=bahir-flink.git;h=b5c7e5d ]
[BAHIR-247] Provide connection validation/idle testing for Flink-Redis Connector (#121)
> Provide connection validation/idle testing for Flink-Redis Connector
> --------------------------------------------------------------------
>
> Key: BAHIR-247
> URL: https://issues.apache.org/jira/browse/BAHIR-247
> Project: Bahir
> Issue Type: Improvement
> Components: Flink Streaming Connectors
> Affects Versions: Flink-1.0
> Reporter: Q Kang
> Priority: Major
>
> When idle connections are timed-out and closed by Redis server, the following exception will be thrown and the Flink job will eventually fail:
> {code:java}
> redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream. at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199) at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) at redis.clients.jedis.Protocol.process(Protocol.java:151) at redis.clients.jedis.Protocol.read(Protocol.java:215)
> ......
> {code}
> It is clear that RedisCommandsContainerBuilder made use of GenericObjectPoolConfig without setting any parameters relating to idle testing. There are 2 possible solutions:
> # Replace GenericObjectPoolConfig directly with JedisPoolConfig, which enabled idle testing by default;
> # Make `testWhileIdle` configurable by user in FlinkJedisPoolConfig.
> Also, `testOnBorrow` and `testOnReturn` can be provided for those who want to validate connections.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)