Andy,

Thanks a lot for the response.  We are using Linux OS.   Is there any
configuration parameter that enables more frequent flush or a parameter
that enables direct write to disk and any idea about performance
implications.

Thanks once again,
Ravi


-----Original Message-----
From: andy thomas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 1:28 PM
To: Ravi T Ramachandra (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS)
Cc: [EMAIL PROTECTED]
Subject: Re: Data loss problem with mysql


On Wed, 24 Nov 2004 [EMAIL PROTECTED] wrote:

>
> Dear all,
>
> We are running mysql 4.0.17 on linux environment.  Our database
resides
> on external disk connected via FC cables.   We recently noticed a loss
> of data in the following scenario.
>
> Inserted a row in a table in a separate transaction by a java
> application, queried a row in the table in a separate transaction by a

> java application and was successful.
> Then the FC cable connecting to external db disks was pulled and after
> sometime put it back
> Now the inserted row is missing in the database.
>
> >From our logs, we have a query log that shows the inserted statement
> prior to FC cable disconnection.  After cable pull, we have taken
> database dump that reveals the missing row that was inserted prior to
> FC cable disconnection.
>
> If somebody would have accidentally deleted, then we can expect the
> delete statement in the query log.  But there is no delete statement
> in the query log.
>
> Can anybody help.

What operating system(s) are you using for the system you are making the
query from and also for the external database server?

mysqld makes as much use of database server system memory as possible
and a lot the live database will be cached in memory. If you insert a
row and then read it back, it will be in the table but the table is in
memory and hasn't necessarily been written to physical disk. Also, UNIX
and Unix-like systems normally work with disk buffers so that when a
file is written to, it is the disk buffer that is written to, not the
physical disk itself. The disk buffers are then flushed out to disk
every 30 seconds.

It could be that the FC cable was unplugged during the buffer flush,
causing the operating system to abort the flush and not update the file
on the physical disk.

Andy




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to