Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: bk commit into 4.1 tree (guilhem:1.1633): msg#00259

db.mysql.devel

Subject: Re: bk commit into 4.1 tree (guilhem:1.1633)

On Sun, Nov 23, 2003 at 05:03:04PM +0100, guilhem@xxxxxxxxx wrote:
>
> ChangeSet
> 1.1633 03/11/23 17:02:59 guilhem@gbichot2 +6 -0
> Replication:
> Now the I/O thread (in flush_master_info()) flushes the relay log to disk
> after reading every event. Slower but provides additionnal safety in case
> of brutal crash.
> I had to make the flush optional (i.e. add a if(some_bool_argument) in the
> function)
> because sometimes flush_master_info() is called when there is no usable
> relay log (the relay log's IO_CACHE is not initialized so can't be flushed).

> @@ -2124,6 +2101,20 @@
> (int)(mi->ssl), mi->ssl_ca, mi->ssl_capath, mi->ssl_cert,
> mi->ssl_cipher, mi->ssl_key);
> flush_io_cache(file);
> + /*
> + Flush the relay log to disk. If we don't do it, then the relay log while
> + have some part (its last kilobytes) in memory only, so if the slave
> server
> + dies now, with, say, from master's position 100 to 150 in memory only
> (not
> + on disk), and with position 150 in master.info, then when the slave
> + restarts, the I/O thread will fetch binlogs from 150, so in the relay log
> + we will have "[0, 100] U [150, infinity[" and nobody will notice it, so
> the
> + SQL thread will jump from 100 to 150, and replication will silently
> break.
> +
> + When we come to this place in code, relay log may or not be initialized;
> + the caller is responsible for setting 'flush_relay_log_cache'
> accordingly.
> + */
> + if (flush_relay_log_cache)
> + flush_io_cache(mi->rli.relay_log.get_log_file());

Shouldn't that flush be done before the flush_io_cache(file) call above,
so that the relay log is flushed before master.info is?

Tim.

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
version-control...    qnx.openqnx.dev...    redhat.rhn.user...    ietf.openpgp/20...    mail.mutt.user/...    web.microformat...    java.sync4j.use...    education.ezpro...    user-groups.blu...    solaris.manager...    org.fitug.debat...    technology.erps...    politics.activi...    linux.redhat.fe...    bug-tracking.ma...    xfce.user/2004-...    hams/2004-11/ms...    kde.users.pim/2...    culture.cooking...    freebsd.devel.x...    gnu.m4.adhoc/20...    ngpt.user/2002-...    apple.fink.deve...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation