> On 2011-05-26 21:16:54, Alan Conway wrote: > > /trunk/qpid/cpp/src/qpid/sys/Timer.h, line 52 > > <https://reviews.apache.org/r/791/diff/1/?file=19675#file19675line52> > > > > From mail trail: "We modified TimerTask slightly so that it would > > schedule the next firing when a cluster task's nextFireTime was in the > > future (in the even that the elder's deliverWakeup message was received > > prior to the local fire time)" > > > > Can you expand a little on why this was needed?
We found that setupNextFire() didn't work in non-elders for the following scenario: - Use queue-purge-interval of 5 seconds for all nodes - Start node 1 (the elder) at time T=0 - Start node 2 at T=2.5 - At T=5, node 1's cluster timer will fire and deliver the wakeup to all nodes - Node 1 will execute the QueueCleaner task and successfully schedule the next fire to approx. T=10 - Node 2 will execute the QueueCleaner task, but it wasn't supposed to have fired yet (its time to fire was T=7.5) - When node 2 tries to schedule its next fire time, it will fail and spit out the error message QPID_LOG(error, name << " couldn't setup next timer firing: " << Duration(nextFireTime, AbsTime::now()) << "[" << period << "]"); If/when node 2 becomes the elder, because setupNextFire() didn't succeed, the QueueCleaner task would remain cancelled and not run any more. - Andy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/791/#review720 ----------------------------------------------------------- On 2011-05-26 20:53:00, Alan Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/791/ > ----------------------------------------------------------- > > (Updated 2011-05-26 20:53:00) > > > Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim. > > > Summary > ------- > > QPID-3280: When sending a large number of messages with nonzero TTLs to a > cluster, overall message throughput drops by around 20-30% compared to > messages with TTL 0. > > Replaced the complicated message expirly logic in the cluster with a simpler > "cluster clock" for expiry of messages with TTL. > > Patch supplied by Andy Goldstein <[email protected]>. > > > Diffs > ----- > > /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1128002 > /trunk/qpid/cpp/src/qpid/broker/ExpiryPolicy.h 1128002 > /trunk/qpid/cpp/src/qpid/broker/ExpiryPolicy.cpp 1128002 > /trunk/qpid/cpp/src/qpid/broker/Message.cpp 1128002 > /trunk/qpid/cpp/src/qpid/broker/QueueCleaner.h 1128002 > /trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp 1128002 > /trunk/qpid/cpp/src/qpid/cluster/Cluster.h 1128002 > /trunk/qpid/cpp/src/qpid/cluster/Cluster.cpp 1128002 > /trunk/qpid/cpp/src/qpid/cluster/ClusterPlugin.cpp 1128002 > /trunk/qpid/cpp/src/qpid/cluster/ClusterSettings.h 1128002 > /trunk/qpid/cpp/src/qpid/cluster/Connection.h 1128002 > /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1128002 > /trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.h 1128002 > /trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.cpp 1128002 > /trunk/qpid/cpp/src/qpid/cluster/UpdateClient.cpp 1128002 > /trunk/qpid/cpp/src/qpid/sys/Timer.h 1128002 > /trunk/qpid/cpp/src/qpid/sys/Timer.cpp 1128002 > /trunk/qpid/cpp/xml/cluster.xml 1128002 > /trunk/qpid/python/examples/api/spout 1128002 > > Diff: https://reviews.apache.org/r/791/diff > > > Testing > ------- > > > Thanks, > > Alan > >
