Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30783

Remove the Key/Value locks hold by a node when it shuts down



    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 10.10
    • Fix Version/s: None
    • Component/s: Key/Value Store


      This scenario leads to a blocking situation:

      1. Start Nuxeo in console mode
      2. Wait until you observe a lock added to the KV store (for example in the kv.cluster collection if KV store is using MongoDB)
      3. Cancel the startup in the console with Ctrl+C

      Observe that when Nuxeo is stopped, the lock remains in the KV store. If another node starts, it won't be able to get the lock and thereforce the startup will fail with an error like

      ERROR [ComponentManager] Component service:org.nuxeo.ecm.directory.DirectoryServiceImpl notification of application started failed: Failed to acquire lock 'start-directories' after 60s, owner: node=1639510102099901827 time=2021-12-14T19:28:59.295Z
      org.nuxeo.runtime.RuntimeServiceException: Failed to acquire lock 'start-directories' after 60s, owner: node=1639510102099901827 time=2021-12-14T19:28:59.295Z
          at org.nuxeo.runtime.kv.ClusterLockHelper.runAtomicallyInternal(ClusterLockHelper.java:150) ~[nuxeo-runtime-kv-10.10-HF23.jar:?]
          at org.nuxeo.runtime.kv.ClusterLockHelper.lambda$runAtomically$0(ClusterLockHelper.java:98) ~[nuxeo-runtime-kv-10.10-HF23.jar:?]
          at org.nuxeo.runtime.kv.ClusterLockHelper.runInSeparateTransaction(ClusterLockHelper.java:119) ~[nuxeo-runtime-kv-10.10-HF23.jar:?]
          at org.nuxeo.runtime.kv.ClusterLockHelper.runAtomically(ClusterLockHelper.java:98) ~[nuxeo-runtime-kv-10.10-HF23.jar:?]
          at org.nuxeo.runtime.kv.ClusterLockHelper.runAtomically(ClusterLockHelper.java:76) ~[nuxeo-runtime-kv-10.10-HF23.jar:?]
          at org.nuxeo.ecm.directory.DirectoryServiceImpl.start(DirectoryServiceImpl.java:95) ~[nuxeo-platform-directory-core-10.10-HF48.jar:?]
          at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.start(RegistrationInfoImpl.java:381) [nuxeo-runtime-10.10-HF45.jar:?]
          at org.nuxeo.runtime.model.impl.ComponentManagerImpl.startComponent(ComponentManagerImpl.java:718) [nuxeo-runtime-10.10-HF45.jar:?]


      Expected behavior: the lock should be released when the node stops.

      This cleanup could be added to KeyValueServiceImpl#stop (and only for the KV store whose name is "cluster").




            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: