Skip to content

deadlock in JedisClusterInfoCache #2083

Closed

Description

@yangzhe1991

I use 2.6.0 and I found a deadlock bug in JedisClusterInfoCache.

In JedisClusterInfoCache.discoverClusterSlots, a non-synchronized method, it locks the WriteLock of RWL, and will execute assignSlotsToNode, a synchronized method. If another thread execute a synchronized method where it wants to lock the ReadLock of RWL, these two methods may get deadlock.

I see in master or 2.6 branch, all the synchronized keywords have been removed. But in commit log I think you removed these synchronized just because it slows down whole throughput. So I think it is a good idea to check JedisClusterInfoCache's code for deadlockfree and publish a 2.6.1 version:)

Activity

  1. yangzhe1991 commented on Oct 21, 2014

    @yangzhe1991
    Author

    sorry to mistake the redis and jedis..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions