Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13537

Clustered Locks are not (always) Released upon Node Dying

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.0.0.Final
    • Clustered Locks
    • None
    • Hide

      Clone the following project: 

      https://github.com/radiosphere/infinispan-test

      Checkout the tag called the same as this issue (ISPN-13537)

      Run the following commands (scripts are written on Ubuntu but should be fine on mac). Note that the two start-server commands should run in separate terminals.

      ./start-server.sh 8080 
      ./start-server.sh 8081 
      ./set-key.sh 8080 a 1 
      ./get-key.sh 8081 a (replies 1) 
      ./kill-server.sh 8080 
      ./set-key.sh 8081 a 2 
      ./get-key.sh 8081 a (replies 1) 

      Expected would have been that the last get-key would reply 2.

      Now for contrast you can run the following series:

      ./start-server.sh 8081
      ./set-key.sh 8080 a 1
      ./set-key.sh 8081 a 2
      ./get-key.sh 8081 a (replies 1)
      ./kill-server.sh 8080
      ./set-key.sh 8081 a 2
      ./get-key.sh 8081 a (replies 2) 

      It seems that trying (but failing) to acquire the lock makes the node react upon the lock owning node dying. This should preferably be done even if you didn't try to acquire the lock.

      Show
      Clone the following project:  https://github.com/radiosphere/infinispan-test Checkout the tag called the same as this issue ( ISPN-13537 ) Run the following commands (scripts are written on Ubuntu but should be fine on mac). Note that the two start-server commands should run in separate terminals. ./start-server.sh 8080 ./start-server.sh 8081 ./set-key.sh 8080 a 1 ./get-key.sh 8081 a (replies 1) ./kill-server.sh 8080 ./set-key.sh 8081 a 2 ./get-key.sh 8081 a (replies 1) Expected would have been that the last get-key would reply 2. Now for contrast you can run the following series: ./start-server.sh 8081 ./set-key.sh 8080 a 1 ./set-key.sh 8081 a 2 ./get-key.sh 8081 a (replies 1) ./kill-server.sh 8080 ./set-key.sh 8081 a 2 ./get-key.sh 8081 a (replies 2) It seems that trying (but failing) to acquire the lock makes the node react upon the lock owning node dying. This should preferably be done even if you didn't try to acquire the lock.

    Description

      When a clustered lock is created it is replicated (or distributed depending on settings) to other nodes in the cluster. If the node that has the lock dies the other nodes has knowledge of the lock, but it doesn't become unlocked (unless another node has tried to acquire the same lock). In end effect this lock will now be held forever. 

      In theory it's still possible to force unlock it, but for the business code there's to easy way to distinguish whether the lock is held by a node that's still in the cluster or not.

      Attachments

        Activity

          People

            karestig@redhat.com Katia Aresti
            jak@radiosphere.com Johan Ablett-Karlsson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: