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

PersistenceManagerImpl stop waits forever for active publishers to finish

    Details

    • Type: Enhancement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.0.Beta3, 9.4.13.Final
    • Fix Version/s: 10.0.0.Final
    • Component/s: Core
    • Labels:
      None

      Description

      PersistenceManagerImpl.stop() acquires all the permits of publisherSemaphore to make sure there is no ongoing iteration. But there is no timeout, so if the application is slowly going through all the entries in a huge cache it could block cache stop for a very long time.

      What's more, when a publisher finishes, the stop thread and other threads trying to start a new publisher have the same priority, and if the new publisher acquires a permit stop will have to wait for it to finish.

      We should limit the amount of time we wait for iterations to finish, similar to how TransactionTable only waits for ongoing transactions to finish for transaction.cacheStopTimeout millis. Ideally we would move cacheStopTimeout out of the transaction configuration and use it everywhere we could wait for user threads to finish doing their work before stopping.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  william.burns Will Burns
                  Reporter:
                  dan.berindei Dan Berindei
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: