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

DefaultCacheManager should stop components after start failure

    Details

    • Type: Bug
    • Status: Pull Request Sent (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 9.4.10.Final, 10.0.0.Beta2
    • Fix Version/s: 10.0.0.Beta4, 9.4.15.Final
    • Component/s: Core
    • Labels:
      None

      Description

      Currently it is impossible to release all the resources allocated during startup if the DefaultCacheManager instance was created with start=true. The user has to do something like this:

      DefaultCacheManager manager = new DefaultCacheManager(..., false);
      try {
         manager.start();
      } catch (Throwable t) {
         manager.stop();
         throw t;
      }
      

      Both the constructor and the public start() method should clean up the started components after a startup failure, so that the user doesn't have to call stop() explicitly.

      Our tests do not currently call stop() explicitly, so they leak threads and sockets when a manager fails to start (e.g. because something went wrong with the CONFIG cache).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated: