summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cpg.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix cluster abort on shutdown in ClusterTimer::fire.Alan Conway2010-02-261-1/+0
| | | | | | | | The cluster destructor was not deleting the ClusterTimer set on the broker, so this timer had a dangling pointer to the cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@916751 13f79535-47bb-0310-9956-ffa450edef68
* Add retry capability to several cpg calls.Michael Goulish2009-12-111-3/+32
| | | | | | | | | | | | | | | First retry is immediate, next one after 10 usec, then 100 usec, etc ... for 5 retries. Retry pause maxes out at 0.1 second. Then give up and report error. The lack of retry on one of these calls must have been responsible for several hard-to-reproduce failures seen over the last month or so. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@889657 13f79535-47bb-0310-9956-ffa450edef68
* Integrated InitialStatusMap into cluster code.Alan Conway2009-11-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881423 13f79535-47bb-0310-9956-ffa450edef68
* cluster::InitialStatusMap and unit tests, support for improved cluster join ↵Alan Conway2009-11-171-6/+9
| | | | | | protocol. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881420 13f79535-47bb-0310-9956-ffa450edef68
* Change CPG initialization log message to notice level.Alan Conway2009-10-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@826695 13f79535-47bb-0310-9956-ffa450edef68
* Fix cman integration to exit immediately on loss of quorum.Alan Conway2009-08-061-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@801740 13f79535-47bb-0310-9956-ffa450edef68
* Fixes for cluster code to compile with new stricter corosync header filesAndrew Stitcher2009-08-041-0/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@800921 13f79535-47bb-0310-9956-ffa450edef68
* Remove some unnecessary promotions of char* to std::string.Alan Conway2009-07-211-13/+18
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@796333 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Correct order of args to memset(); fixes QPID-1787Stephen D. Huston2009-06-181-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@786148 13f79535-47bb-0310-9956-ffa450edef68
* Remove workaround for buggy corosync headers, no longer needed.Alan Conway2009-05-011-7/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@770734 13f79535-47bb-0310-9956-ffa450edef68
* Better logging around cpg_init, 30 second retry limit.Alan Conway2009-04-221-4/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@767663 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: fix exception handling if updater fails to connect to updatee.Alan Conway2009-04-061-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@762370 13f79535-47bb-0310-9956-ffa450edef68
* Fix problems buildling on gcc 4.4 and latest corosync.Alan Conway2009-03-111-7/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@752600 13f79535-47bb-0310-9956-ffa450edef68
* Remove "flow enabled" log messages.Alan Conway2009-02-261-8/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@748215 13f79535-47bb-0310-9956-ffa450edef68
* Cluster start-up retries to handle slow cman start-up.Alan Conway2009-02-141-1/+8
| | | | | | | | - infinite retry if cpg_initialize returns TRY_AGAIN. - infinite retry for cman_is_quorate git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@744321 13f79535-47bb-0310-9956-ffa450edef68
* Demote CPG flow control warning message to debug.Alan Conway2009-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@742520 13f79535-47bb-0310-9956-ffa450edef68
* Fix memory error in ClusterPlugin.Alan Conway2009-02-041-5/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740849 13f79535-47bb-0310-9956-ffa450edef68
* Clean up error messages.Alan Conway2009-02-041-14/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740756 13f79535-47bb-0310-9956-ffa450edef68
* Include CPG error code in message.Alan Conway2009-01-141-16/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@734479 13f79535-47bb-0310-9956-ffa450edef68
* Fix for compatibility with latest corosync.Alan Conway2009-01-081-7/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732854 13f79535-47bb-0310-9956-ffa450edef68
* Fix to build on latest corosync versions.Alan Conway2009-01-081-3/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732839 13f79535-47bb-0310-9956-ffa450edef68
* Handle package name changes in Fedora10: openais->corosync cman->cmanlibAlan Conway2008-12-171-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@727583 13f79535-47bb-0310-9956-ffa450edef68
* PollableQueue: fix unsafe use of dequeAlan Conway2008-12-021-7/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@722622 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: handle CPG flow-control conditions.Alan Conway2008-12-021-22/+26
| | | | | | | PollableQueue: allow dispatch functions to refuse dispatch. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@722614 13f79535-47bb-0310-9956-ffa450edef68
* Refactor Cluster logic into separate handlers for Joining & Member modes.Alan Conway2008-09-181-3/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@696657 13f79535-47bb-0310-9956-ffa450edef68
* Added ClusterMap and test. Moved PollableCondition, PollableQueue to sys.Alan Conway2008-09-121-0/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@694758 13f79535-47bb-0310-9956-ffa450edef68
* Fixed cluster membership notification.Alan Conway2008-09-051-30/+0
| | | | | | | | | Cluster events with RefCountedBuffers for queueing. PollableQueue clears bacth immediately. Improved perfdist: clients hit multiple brokers in a cluster. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@692521 13f79535-47bb-0310-9956-ffa450edef68
* Cluster multicasts buffers rather than frames.Alan Conway2008-09-031-13/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@691489 13f79535-47bb-0310-9956-ffa450edef68
* Refactored cluster to intercept at ConnectionCode, using sys:: interfaces ↵Alan Conway2008-08-291-11/+33
| | | | | | | | | rather than boost functions. Use framing::Operations and Invoker to dispatch cluster methods. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@690358 13f79535-47bb-0310-9956-ffa450edef68
* Integrate CPG file descriptor into broker polling.Alan Conway2008-08-111-4/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@684865 13f79535-47bb-0310-9956-ffa450edef68
* Check CPG flow control.Alan Conway2008-08-071-0/+40
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683711 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: shadow connections, fix lifecycle & valgrind issues.Alan Conway2008-07-171-4/+4
| | | | | | | | | - tests/ForkedBroker: improved broker forking, exec full qpidd. - Plugin::addFinalizer - more flexible way to shutdown plugins. - Reworked cluster extension points using boost::function. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@677471 13f79535-47bb-0310-9956-ffa450edef68
* Removed static Cpg::handlers, fixed ForkedBroker shutdown.Alan Conway2008-07-081-39/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674855 13f79535-47bb-0310-9956-ffa450edef68
* Cluster prototype: handles client-initiated commands (not dequeues)Alan Conway2008-07-041-11/+7
| | | | | | | | | | | | | | | | Details - Cluster.cpp: serializes all frames thru cluster (see below) - broker/ConnectionManager: Added handler chain in front of Connection::received. - sys::Fork and ForkWithMessage - abstractions for forking with posix impl. - tests/ForkedBroker.h: test utility to fork a broker process. - broker/SignalHandler: Encapsulated signal handling from qpidd.cpp - Various minor logging & error message improvements to aid debugging. NB: current impl will not scale. It is functional working starting point so we can start testing & profiling to find the right optimizations. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674107 13f79535-47bb-0310-9956-ffa450edef68
* Plugin framework change: single PluginFactory creates per-target Plugin ↵Alan Conway2008-06-261-2/+1
| | | | | | instances. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@672032 13f79535-47bb-0310-9956-ffa450edef68
* Consolidated cluster tests in cluster_test.cppAlan Conway2008-06-261-1/+1
| | | | | | | Improvements to BrokerFixture for testing. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@671969 13f79535-47bb-0310-9956-ffa450edef68
* Re-enabled build of cluster code when openais is installed.Alan Conway2008-01-291-11/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@616507 13f79535-47bb-0310-9956-ffa450edef68
* - Update cluster code to work with new FrameHandlerAlan Conway2007-08-301-0/+7
| | | | | | | | - Update ClassifierHandler to use Visitor rather than map. - Replace heap allocation in cluster classes with boost::optional. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571246 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/cluster.mk: Enable cluster test.Alan Conway2007-07-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | * src/tests/Cluster.h (class TestHandler): Fixed race in TestHandler::waitFor * src/tests/Cluster.cpp - Allow separate start of parent and child processes. * src/qpid/Options.cpp (parse): Skip argv parsing if argc=0. * src/qpid/cluster/Cluster.cpp (configChange): assert group name. * src/qpid/cluster/Cpg.cpp, .h: Additional logging * src/qpid/framing/AMQFrame.cpp: Initialize all fields in ctor, avoid valgrind warning. * src/qpid/log/Logger.cpp: Initialize singleton automatically from environment so logging can be used on tests. * src/qpid/sys/Time.h: Avoid overflow in AbsTime(t, TIME_INFINITE) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@558710 13f79535-47bb-0310-9956-ffa450edef68
* 2007-06-30 <aconway@redhat.com>Alan Conway2007-07-021-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/qpid/cluster/Cluster.cpp: Refactor - expose 4 handler points for all traffic to/from cluster. Removed HandlerUpdater functionality, separate class. Cluster only deals with membership and connecting the 4 handler points to CPG multicast. * src/tests/cluster.mk: Dropped newgrp ais wrapper scripts, its much simpler if the user just does "newgrp ais" before building. * src/tests/ais_check: Test script to check if users gid is ais and give clear notice if not. * src/tests/Cluster.cpp: Updated for changes to Cluster. * src/qpid/cluster/Cpg.cpp: Better messages for common errors. * Handler.h: Remove nextHandler() minor convenience is outweighted by risk of undetected errors if handlers that expect next() to be set are called when it's not set. * src/qpid/cluster/Cpg.cpp: Added logging. Replaced boost::function with traditional virtual interface (nasty stack traces.) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552614 13f79535-47bb-0310-9956-ffa450edef68
* 2007-06-25 <aconway@redhat.com>Alan Conway2007-06-261-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cluster class implementing cluster membership map. * src/qpid/cluster/Cluster.cpp: Cluster membership implementation. * src/qpid/cluster/Cpg.cpp: Support for boost::function callbacks. * src/tests/Url.cpp: Implements AMQP-95 URL format. * xml/cluster.xml: Cluster join method. Build/packaging * README: Remove mention of openais till clustering is functional. For now it is optional and we depend on an unpackaged version. * configure.ac: Check openais has cpg_local_get(). * Makefile.am: Added cluster.xml to EXTRA_DIST. * src/generate.sh: add cluster.xml to codegen. * src/tests/Makefile.am: - Generate individual "sudo -u ais" wrappers for openais tests. - Drop "unit" directory, all unit tests in "tests" directory Minor changes: * src/qpid/sys/posix/Socket.cpp: * src/qpid/sys/posix/PosixAcceptor.cpp: * src/qpid/sys/posix/EventChannelAcceptor.cpp: * src/qpid/sys/apr/APRAcceptor.cpp: * src/qpid/sys/Acceptor.h (getHost): Added getHost() * src/tests/.valgrind.supp-default: Suppress benign valgrind warning in libcpg. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550658 13f79535-47bb-0310-9956-ffa450edef68
* Build support for clustering, initial CPG wrapper & tests.Alan Conway2007-06-071-0/+62
- src/qpid/cluster/Cpg.cpp: C++ wrapper for the openais CPG library. - src/tests/unit/Cpg.cpp: verify CPG functions in make check. - makefiles etc.: build cluster stuff only if openais is installed. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@545190 13f79535-47bb-0310-9956-ffa450edef68