Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-2391

change stop commands to be synchronous

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • gfsh
    • None

    Description

      Issuing a stop locator or stop server command will result in executing MemberMXBean#shutDownMember:

      /**
       * Shuts down the member. This is an asynchronous call and it will return immediately without
       * waiting for a result.
       */
      @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.MANAGE)
      public void shutDownMember();
      

      Changing the stop commands to be synchronous (or as synchronous as possible) would be a desirable improvement if we include an option for asynchronous shutdown, such as --async.

      Some options:

      1) Gfsh could be changed wait for the process identified by that pid to terminate. This would require gfsh to be running on the same machine and either tools.jar or jna.jar in the classpath.

      2) If the process being terminated is remote, then gfsh could be connected to a different locator process and block until the stopped process departs the cluster of the locator that gfsh is connected to.

      This second approach would not work for the locator process itself if gfsh is connected directly to it (unless it's local and tools.jar or jna.jar is in the classpath). Another possibility is to have gfsh wait until the locator process kills its mbeanserver and rmi connection to gfsh.

      3) Another approach is to have gfsh wait for the pid file of the process that's being stopped to be deleted. This requires gfsh to be running on a machine with visibility to the same filesystem and for gfsh to know the working directory of the process being stopped.

      #1 is the most solid but has limited usability since gfsh has to be executing on the same machine.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              klund Kirk Lund
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: