Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9791

Adjust stop-server.ps1 to behave similarly to stop behavior in cassandra init script

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.2.0
    • Local/Config
    • None
    • cassandra-2.2 branch.

    Description

      I have a test that repeatedly rolls nodes in a C* cluster. Occasionally I run into a case where a node is not restarted because stop-server.ps1 returns before the C* process had terminated.

      This is because stop-server.ps1 currently will wait for up to 2 seconds for cassandra to exit from a CTRL+C and then returns. In practice it can take cassandra longer than that to exit and the script doesn't give you any indication that cassandra is still running.

      Proposing that stop-server.ps1 behaves the same way as the 'cassandra' init script provided by dsc21 does:

      start-stop-daemon -K -p "$PIDFILE" -R TERM/30/KILL/5 >/dev/null

      The init script currently sends a SIGTERM (CTRL+C) to the process and if it hasn't terminated after 30 seconds sends a SIGKILL to it.

      Attachments

        1. CASSANDRA-9791.patch
          2 kB
          Andy Tolbert

        Activity

          People

            andrew.tolbert Andy Tolbert
            andrew.tolbert Andy Tolbert
            Andy Tolbert
            Joshua McKenzie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: