[rabbitmq-discuss] persistent messages can't survive restart with new persister b6324e288cfd (bug21673)

Matthew Sackman matthew at lshift.net
Fri Dec 11 16:59:03 GMT 2009


Hi Anton,

On Fri, Dec 11, 2009 at 07:05:20PM +0300, mabrek wrote:
> On Fri, Dec 11, 2009 at 6:38 PM, Matthew Sackman <matthew at lshift.net> wrote:
> > On Fri, Dec 11, 2009 at 09:30:29AM -0600, Garrett Smith wrote:
> >> If you shut down gracefully the caches aren't flushed to disk?
> >
> > No no, if it's a safe shutdown then yes, everything gets flushed out and
> > sync'd correctly. I should have made that clear above. You should only
> > lose messages in the event of a hard kill.
> 
> Yes, it's logical to lose messages after kill -9.
> But in in my case messages got lost after safe shutdown
> (/etc/init.d/rabbitmq restart or
> rabbitmqctl stop)

Thank you very much for this bug report. I'm afraid that's the risk with
testing code before it's gone through QA. I was able to reproduce this
and have fixed it, in revision 166365bd96ef. The problem was actually
nothing to do with flushing data out - that was happening correctly, and
the queue was also recovering correctly. However, it was then ignoring
some counts and thus erroneously reporting a length of 0.

Please update to the latest on bug21673 and let me know if you see it
fixed.

Btw, I also tested hard killing Rabbit and that did lose messages.
However, with just 10 messages in the queue, a safe shutdown and restart
now correctly picks up the 10 messages in the queue, whereas before it
didn't.

Thanks once again,

Matthew




More information about the rabbitmq-discuss mailing list