Closed liuguoshun closed 1 year ago
@liuguoshun So what happens here is that the log entries you are seeing is the logging put into the except
part when executing a command. It dont really means that this error will propagate up to your code directly. When each command is executed by the client, there is a loop with 16 attempts called TTL:s where if the client finds one of a set of well known issues like a failover or simple connection error, it will in some cases try to rebuild the cluster state configuration due to most likely a failover or reshard event has occured on the redis cluster side. Or your network simply might just have a bad hiccup shortly so we can just reattempt again and in most case:s we get a valid connection and a working command executed on attempt 2 or 3 or 10. This behavior is indeed the intended behavior because if you would to track each node in your cluster with MONITOR
you would find out that your command most likley have been executed correct on the target node and thus rc.set()
will return True as the command executed correct by the cluster, eventually it did.
when set() got ConnectionError ,return value should be nil. but still return True.
2.this is part of my code.
3.this is log