You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Shreyans Jain <sh...@gmail.com> on 2017/07/12 18:04:35 UTC

Derby Database Corruption Issues

I was reading https://wiki.apache.org/db-derby/DatabaseCorruption and i
found prevention of corruption which states
"Switch off the machine's write caching" . now the article is written in
2013. Is it still application to derby database corruption or now it has no
effect.

Regards,
Shreyans Jain

Re: Derby Database Corruption Issues

Posted by Peter Ondruška <pe...@kaibo.eu>.
Hi,

This is still valid (and in general for all systems utilising logging).

Regards,
p.

On 12 July 2017 at 20:04, Shreyans Jain <sh...@gmail.com> wrote:

> I was reading https://wiki.apache.org/db-derby/DatabaseCorruption and i
> found prevention of corruption which states
> "Switch off the machine's write caching" . now the article is written in
> 2013. Is it still application to derby database corruption or now it has no
> effect.
>
> Regards,
> Shreyans Jain
>



-- 
Peter Ondruška

-- 
kaibo, s.r.o., ID 28435036, registered with the commercial register 
administered by the Municipal Court in Prague, section C, insert 141269.
Registered office and postal address: kaibo, s.r.o., Kališnická 379/10, 
Prague 3, 130 00, Czech Republic.
https://www.kaibo.eu

Re: Derby Database Corruption Issues

Posted by Shreyans Jain <sh...@gmail.com>.
Also the same article displays " write cache techniques. Some hardware has
a default setting of 'write cache' set to enabled. This functionality will
interfere with Derby's expectation of what is written when to the disk, and
has shown to cause database corruption. "

Is it the same write cache that we can disable via OS on windows 10 from
Device Manager > Properties of Disk Drive > Policies tab or it has to be
disabled from somewhere in BIOS.

Regards,
Shreyans Jain

On Thu, Jul 13, 2017 at 12:32 AM, Kristian Waagan <kr...@apache.org>
wrote:

> Hi Shreyans,
>
> I believe this is still valid advice, but the details depend on your
> IO-system, your operating system and your server hardware.
>
> The issue here is that Derby is told the data has been written to stable
> storage, but then it has in fact not. If the machine crashes at this point
> data may be lost.
> For instance, if you are using a SAN there is typically a battery / UPS
> backed buffer (or other types of buffers that don't loose data in case of a
> power outage) on the "storage side", but for this to be useful you must
> ensure data is pushed through the IO driver and is not buffered locally by
> the operating system.
>
> Using asynchronous writes is a typical way of obtaining better [write]
> performance. In many cases the downside is a higher chance of data
> corruption.
> This may or may not be acceptable for your application.
>
>
> Regards,
> --
> Kristian
>
> Den ons. 12. jul. 2017, 20:04 skrev Shreyans Jain <shreyans2799@gmail.com
> >:
>
>> I was reading https://wiki.apache.org/db-derby/DatabaseCorruption and i
>> found prevention of corruption which states
>> "Switch off the machine's write caching" . now the article is written in
>> 2013. Is it still application to derby database corruption or now it has no
>> effect.
>>
>> Regards,
>> Shreyans Jain
>>
>

Re: Derby Database Corruption Issues

Posted by Kristian Waagan <kr...@apache.org>.
Hi Shreyans,

I believe this is still valid advice, but the details depend on your
IO-system, your operating system and your server hardware.

The issue here is that Derby is told the data has been written to stable
storage, but then it has in fact not. If the machine crashes at this point
data may be lost.
For instance, if you are using a SAN there is typically a battery / UPS
backed buffer (or other types of buffers that don't loose data in case of a
power outage) on the "storage side", but for this to be useful you must
ensure data is pushed through the IO driver and is not buffered locally by
the operating system.

Using asynchronous writes is a typical way of obtaining better [write]
performance. In many cases the downside is a higher chance of data
corruption.
This may or may not be acceptable for your application.


Regards,
-- 
Kristian

Den ons. 12. jul. 2017, 20:04 skrev Shreyans Jain <sh...@gmail.com>:

> I was reading https://wiki.apache.org/db-derby/DatabaseCorruption and i
> found prevention of corruption which states
> "Switch off the machine's write caching" . now the article is written in
> 2013. Is it still application to derby database corruption or now it has no
> effect.
>
> Regards,
> Shreyans Jain
>