diff options
| author | Alan Conway <aconway@apache.org> | 2009-07-10 15:42:36 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-07-10 15:42:36 +0000 |
| commit | 82d0880a9a9a65029d35422ad2dff675b867bb6c (patch) | |
| tree | b974a2a89e13000cd9ff680b05a74df7bcf09ea5 /cpp/src/qpid/cluster/ErrorCheck.h | |
| parent | 072ce948be1894a1fbaccf4accb0eb9788275bd9 (diff) | |
| download | qpid-python-82d0880a9a9a65029d35422ad2dff675b867bb6c.tar.gz | |
Fix cluster handling of multiple errors.
If an error occured while there were frames on the error queue from a
previous error, the enqueued frames were not being processed for the
new error, which could lead to error-check or config-change frames
being missed.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@792991 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ErrorCheck.h')
| -rw-r--r-- | cpp/src/qpid/cluster/ErrorCheck.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/ErrorCheck.h b/cpp/src/qpid/cluster/ErrorCheck.h index d303ecea65..236b820116 100644 --- a/cpp/src/qpid/cluster/ErrorCheck.h +++ b/cpp/src/qpid/cluster/ErrorCheck.h @@ -41,8 +41,8 @@ class Connection; /** * Error checking logic. * - * When an error occurs stop processing frames and queue them until we - * can determine if all nodes experienced the error. If not, we shut down. + * When an error occurs queue up frames until we can determine if all + * nodes experienced the error. If not, we shut down. */ class ErrorCheck { @@ -59,18 +59,22 @@ class ErrorCheck /** Called when a frame is delivered */ void delivered(const EventFrame&); + /**@pre canProcess **/ EventFrame getNext(); bool canProcess() const; + bool isUnresolved() const; private: + typedef std::deque<EventFrame> FrameQueue; + FrameQueue::iterator review(const FrameQueue::iterator&); void checkResolved(); Cluster& cluster; Multicaster& mcast; - std::deque<EventFrame> frames; - std::set<MemberId> unresolved; + FrameQueue frames; + MemberSet unresolved; uint64_t frameSeq; ErrorType type; Connection* connection; |
