You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2009/08/14 17:39:09 UTC

svn commit: r804263 - in /qpid/trunk/qpid/cpp/src/qpid/cluster: WatchDogPlugin.cpp qpidd_watchdog.cpp

Author: aconway
Date: Fri Aug 14 15:39:08 2009
New Revision: 804263

URL: http://svn.apache.org/viewvc?rev=804263&view=rev
Log:
Added documentation to watchdog plugin.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/cluster/WatchDogPlugin.cpp
    qpid/trunk/qpid/cpp/src/qpid/cluster/qpidd_watchdog.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/WatchDogPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/WatchDogPlugin.cpp?rev=804263&r1=804262&r2=804263&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/WatchDogPlugin.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/WatchDogPlugin.cpp Fri Aug 14 15:39:08 2009
@@ -16,6 +16,28 @@
  *
  */
 
+/**@file
+
+   The watchdog plug-in will kill the qpidd broker process if it
+   becomes stuck for longer than a configured interval.
+
+   If the watchdog plugin is loaded and the --watchdog-interval=N
+   option is set then the broker starts a watchdog process and signals
+   it every N/2 seconds.
+
+   The watchdog process runs a very simple program that starts a timer
+   for N seconds, and resets the timer to N seconds whenever it is
+   signalled by the broker. If the timer ever reaches 0 the watchdog
+   kills the broker process (with kill -9) and exits.
+
+   This is useful in a cluster setting because in some insttances
+   (e.g. while resolving an error) it's possible for a stuck process
+   to hang other cluster members that are waiting for it to send a
+   message.  Using the watchdog, the stuck process is terminated and 
+   removed fromt the cluster allowing other members to continue and
+   clients of the stuck process to fail over to other members.
+
+*/
 #include "qpid/Plugin.h"
 #include "qpid/Options.h"
 #include "qpid/log/Statement.h"

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/qpidd_watchdog.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/qpidd_watchdog.cpp?rev=804263&r1=804262&r2=804263&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/qpidd_watchdog.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/qpidd_watchdog.cpp Fri Aug 14 15:39:08 2009
@@ -18,6 +18,9 @@
  * under the License.
  *
  */
+
+/** @file helper executable for WatchDogPlugin.cpp */
+
 #include <sys/types.h>
 #include <sys/time.h>
 #include <signal.h>



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org