----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5231/#review8107 -----------------------------------------------------------
Ship it! My paranoid side would want the various truncate() methods to assert()/NDEBUG check that the state of any removed (e.g. seq > n) QueuedMessage is DELETED. That would catch any violations of the pre-condition that may be introduced... or maybe just the first, given the cost of checking each message. My non-paranoid side tells my paranoid side to get a life, however :) - Kenneth On 2012-05-25 13:56:33, Alan Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5231/ > ----------------------------------------------------------- > > (Updated 2012-05-25 13:56:33) > > > Review request for qpid, Gordon Sim and Kenneth Giusti. > > > Summary > ------- > > In the new HA code a backup may sometimes be ahead of the new primary > after a > fail-over. In that case the backup truncates it's queues to the same > position > as the primary so it can continue replicating. > > > Diffs > ----- > > /trunk/qpid/cpp/src/qpid/broker/MessageDeque.h 1342442 > /trunk/qpid/cpp/src/qpid/broker/MessageDeque.cpp 1342442 > /trunk/qpid/cpp/src/qpid/broker/MessageMap.h 1342442 > /trunk/qpid/cpp/src/qpid/broker/MessageMap.cpp 1342442 > /trunk/qpid/cpp/src/qpid/broker/Messages.h 1342442 > /trunk/qpid/cpp/src/qpid/broker/PriorityQueue.h 1342442 > /trunk/qpid/cpp/src/qpid/broker/PriorityQueue.cpp 1342442 > /trunk/qpid/cpp/src/qpid/broker/Queue.h 1342442 > /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1342442 > /trunk/qpid/cpp/src/tests/Makefile.am 1342442 > /trunk/qpid/cpp/src/tests/QueueTest.cpp 1342442 > /trunk/qpid/cpp/src/tests/brokertest.py 1342442 > /trunk/qpid/tools/src/py/.gitignore 1342442 > > Diff: https://reviews.apache.org/r/5231/diff > > > Testing > ------- > > Passing make check, added unit tests to QueueTests.cpp > > > Thanks, > > Alan > >
