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

"Cannot clear data directory" in SoftIndexFileStore when clear() is called after stopping and restarting cache

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 7.2.3.Final
    • Loaders and Stores
    • None
    • Hide

      run test case from attached file which basically repeatedly clears the cache, fills it, stops it and restarts it.

      Show
      run test case from attached file which basically repeatedly clears the cache, fills it, stops it and restarts it.
    • I am closing this issue since we had no further user input, and I have no Windows machine to reproduce it. Please reopen if you find another info that could provide hints.

      When stopping and restarting a cache with SoftIndexFileStore persistence, it behaves strangely.

      Calling cache.clear() leads to the following exception:

      ERROR: ISPN000136: Execution error
      org.infinispan.persistence.spi.PersistenceException: Cannot clear data directory!
      at org.infinispan.persistence.sifs.SoftIndexFileStore.clear(SoftIndexFileStore.java:234)
      at org.infinispan.persistence.manager.PersistenceManagerImpl.clearAllStores(PersistenceManagerImpl.java:372)
      at org.infinispan.interceptors.CacheWriterInterceptor.visitClearCommand(CacheWriterInterceptor.java:158)
      ...
      Caused by: java.io.IOException: Cannot delete file soft-index-test\data\2
      at org.infinispan.persistence.sifs.FileProvider.clear(FileProvider.java:205)
      at org.infinispan.persistence.sifs.SoftIndexFileStore.clear(SoftIndexFileStore.java:232)

      If the manager is also stopped and recreated every time, this only happens after the third iteration.

      Calling cache.remove() in the same place leads to an unrecoverable corruption of the cache store files: java.lang.IllegalArgumentException: Negative position

      A separate issue has been filed for this issue: ISPN-6546

        1. SoftIndexFileStoreTest.java
          2 kB
        2. test.log
          1.01 MB
        3. test2.log
          1.01 MB
        4. test3.log
          1.56 MB

            rvansa1@redhat.com Radim Vansa (Inactive)
            apabst Andreas Pabst (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: