Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们有一个 Redis 集群,其中包含 3 个分片,每个分片都有一个副本节点。如果在分片中获得锁并且当线程持有锁时,主节点和副本节点将关闭。集群会等到分片恢复运行并且直到那时才接受新的锁,还是会使用 2 个分片运行并在新分片中创建新锁?
这取决于retryAttempts和retryInterval设置。它们应该足够大,可以在故障转移中存活下来。
retryAttempts
retryInterval