Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-2671

Node cannot join topology when cache lock is held.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.0.final
    • None
    • cache

    Description

      The problem is originally reported by Mario: http://apache-ignite-users.70518.x6.nabble.com/Semaphore-blocking-on-tryAcquire-while-holding-a-cache-lock-td3031.html

      Description
      When a lock is held on a cache key, another node cannot join topology. It hangs somewhere on partition exchange future.

      Steps to reproduce
      Run the following code and observe that ">>> STARTED 2" is never printed because we cannot leave Ignition.start() method.

      public static void main(String[] args) {
          // Start the first node.
          Ignite ignite = Ignition.start(new IgniteConfiguration().setGridName("1"));
      
          System.out.println(">>> STARTED 1");
      
          // Create cache and obtain a lock on it.
          CacheConfiguration<String, String> ccfg =
              new CacheConfiguration<String, String>().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
      
          ignite.getOrCreateCache(ccfg).lock("key").lock();
      
          System.out.println(">>> LOCKED");
      
          Ignition.start(new IgniteConfiguration().setGridName("2"));
      
          System.out.println(">>> STARTED 2");
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            vozerov Vladimir Ozerov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: