Skip to content

Instantly share code, notes, and snippets.

View Spikhalskiy's full-sized avatar

Dmitry Spikhalsky Spikhalskiy

View GitHub Profile
@Spikhalskiy
Spikhalskiy / PartitionsException.txt
Last active January 26, 2017 18:14
Lettuce state with often calling for failed node
com.lambdaworks.redis.RedisException: Cannot determine a partition to read for slot 8884 (Partitions: Partitions [RedisClusterNodeSnapshot [uri=RedisURI [host='10.220.12.23', port=9005], nodeId='cf7adb8e0b27104183fb941cc0dcb3a0e845182d', connected=true, slaveOf='null', pingSentTimestamp=0, pongReceivedTimestamp=1485444816407, configEpoch=168, flags=[MASTER], slot count=1092], RedisClusterNodeSnapshot [uri=RedisURI [host='10.220.12.24', port=9005], nodeId='16ec766e7b0da4eba4593bd861b9a57693ac8b6f', connected=true, slaveOf='0e3466bdb8765b1328f180cca89ff5b5f6feb8d7', pingSentTimestamp=0, pongReceivedTimestamp=1485444819412, configEpoch=132, flags=[SLAVE], slot count=0], RedisClusterNodeSnapshot [uri=RedisURI [host='10.220.12.23', port=9003], nodeId='6a48d454d5a4c8b3cfe6c6a144ebfa95da207454', connected=true, slaveOf='null', pingSentTimestamp=0, pongReceivedTimestamp=1485444817909, configEpoch=127, flags=[MASTER], slot count=1093], RedisClusterNodeSnapshot [uri=RedisURI [host='10.220.12.24', port=9001], nodeId='45
@Spikhalskiy
Spikhalskiy / ReadTimeoutAfterWriteHandler.java
Last active June 21, 2016 16:53
Netty's Handler that emulate request timeout behavior for http client
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.handler.timeout.ReadTimeoutException;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
/**