[2.3.11] sync_client bug: Starting MASTER imap-server can be delayed for 1000s if SLAVE is down.

Boris Lytochkin boris.lytochkin at e-port.ru
Tue Jan 15 02:54:17 EST 2008

Bron, look at my 1). I know about -o option :)
As I can see from source code, main idea in do_daemon() function is to
fork a child process that will connect to replica and do all jobs
needed. So connecting to replica in main() for rolling replication is not right.

Tuesday, January 15, 2008, 5:45:59 AM, you wrote:

> On Mon, Jan 14, 2008 at 11:18:22PM +0300, Boris Lytochkin wrote:
>> How to replicate:
>> 1) Set replication up (master's cyrus.conf runs sync_client w/o -o option)
>> 2) Shutdown both master & slave
>> 3) Start MASTER cyrus.
>> While SLAVE is down MASTER do not start services (i.e. imap server is
>> down for users) because sync_client do not go into background.
>> There is a patch in attachment that:
>> - fixes this bug releasing MASTER as soon as possible (even before connecting to SLAVE)
>> - adds some additional debug messages into do_sync(...)
>> - adds -D flag that disables 1st-level fork() for sync_client.

> There's also the "-o" flag (I see I didn't add it in the synopsis
> at the top of the manpage, oops, but it's documented in the main
> option listing).  This is what we use at FastMail so master will
> continue to start.

> Bron.

Best regards,
 Boris Lytochkin                            mailto:boris.lytochkin at e-port.ru

More information about the Cyrus-devel mailing list