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

Lock SIFS directories to avoid shared usage between instances

XMLWordPrintable

      If an application creates multiple instances of the Cache Manager or multiple caches, all mapping to the same directory, SIFS does not behave as expected. To clarify the undesired behavior:

       

      1. A user can have a single configuration and create multiple instances of the cache manager. Each cache will then point to the same data location with SIFS and can issue operations concurrently. An operation done by one instance is not visible to the other and might break everything since the pointers to the file regions now are not correct.
      2. A user can have a single Cache Manager but configure multiple caches pointing to the same directory. This also has the same effect as point 1 since each instance modifies the files concurrently.

       

      We can utilize a global lock on the filesystem to have a single owner. This approach is the same in the server with the global persistent state. This way, we can identify a misconfiguration earlier instead of silently failing.

       

      The fix will then create a lock at the start and release on stop. If it is identified another instance holds the lock, the cache will not initialize. We can only identify this when trying to retrieve the running cache instance.

              rh-ee-jbolina Jose Bolina
              rh-ee-jbolina Jose Bolina
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: