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/15 01:21:46 UTC

Write Cache - Data Corruption

If we have a ups and we properly shutdown the OS, will then we have to
disable write cache for the hard-disk in order to prevent data corruption.
Are there any chances left for the data to be corrupted by power failure
with write cache on?

Regards,
Shreyans Jain

Re: Write Cache - Data Corruption

Posted by Kristian Waagan <kr...@apache.org>.
Correct, you absolutely don't need a UPS for Derby to function. The issues
to consider with an abrupt shutdown would be loss of uncommitted
transactions and recovery time.

There's also the usual additional risk that something goes awry in the OS
or with the hardware itself. That risk is likely way lower than the risk of
programming or operator error. In any case, this is when you want your
backup and restore procedures to be tested and working.

As Rick pointed out, and which is described on the webpage referred to, a
UPS can give you power of higher quality and protect your hardware.

Regards,
-- 
Kristian

Den søn. 16. jul. 2017, 16:42 skrev Shreyans Jain <sh...@gmail.com>:

> Why would we need any kind of power backup if every thing is directly
> written to disk, write cache being off. Only risk would be of losing last
> transaction data.
>
> On Jul 16, 2017 7:58 PM, "Rick Hillegas" <ri...@gmail.com> wrote:
>
>> On 7/15/17 10:12 PM, Shreyans Jain wrote:
>>
>> If we have write cache off, do we need a ups or some other power backup ?
>>
>> I'm not an expert on ups's, but my understanding is that they provide
>> other kinds of protective power conditioning which you would want in a
>> production environment. See, for instance,
>> https://en.wikipedia.org/wiki/Uninterruptible_power_supply.
>>
>> Hope this helps,
>> -Rick
>>
>>
>> On Sat, Jul 15, 2017 at 8:02 PM, Rick Hillegas <ri...@gmail.com>
>> wrote:
>>
>>> On 7/14/17 6:21 PM, Shreyans Jain wrote:
>>>
>>>> If we have a ups and we properly shutdown the OS, will then we have to
>>>> disable write cache for the hard-disk in order to prevent data corruption.
>>>> Are there any chances left for the data to be corrupted by power failure
>>>> with write cache on?
>>>>
>>>> Regards,
>>>> Shreyans Jain
>>>>
>>>
>>> That will reduce your risk. But operating systems can crash before
>>> flushing the cache to disk.
>>>
>>>
>>
>>

Re: Write Cache - Data Corruption

Posted by Shreyans Jain <sh...@gmail.com>.
Why would we need any kind of power backup if every thing is directly
written to disk, write cache being off. Only risk would be of losing last
transaction data.

On Jul 16, 2017 7:58 PM, "Rick Hillegas" <ri...@gmail.com> wrote:

> On 7/15/17 10:12 PM, Shreyans Jain wrote:
>
> If we have write cache off, do we need a ups or some other power backup ?
>
> I'm not an expert on ups's, but my understanding is that they provide
> other kinds of protective power conditioning which you would want in a
> production environment. See, for instance, https://en.wikipedia.org/wiki/
> Uninterruptible_power_supply.
>
> Hope this helps,
> -Rick
>
>
> On Sat, Jul 15, 2017 at 8:02 PM, Rick Hillegas <ri...@gmail.com>
> wrote:
>
>> On 7/14/17 6:21 PM, Shreyans Jain wrote:
>>
>>> If we have a ups and we properly shutdown the OS, will then we have to
>>> disable write cache for the hard-disk in order to prevent data corruption.
>>> Are there any chances left for the data to be corrupted by power failure
>>> with write cache on?
>>>
>>> Regards,
>>> Shreyans Jain
>>>
>>
>> That will reduce your risk. But operating systems can crash before
>> flushing the cache to disk.
>>
>>
>
>

Re: Write Cache - Data Corruption

Posted by Rick Hillegas <ri...@gmail.com>.
On 7/15/17 10:12 PM, Shreyans Jain wrote:
> If we have write cache off, do we need a ups or some other power backup ?
I'm not an expert on ups's, but my understanding is that they provide 
other kinds of protective power conditioning which you would want in a 
production environment. See, for instance, 
https://en.wikipedia.org/wiki/Uninterruptible_power_supply.

Hope this helps,
-Rick
>
> On Sat, Jul 15, 2017 at 8:02 PM, Rick Hillegas 
> <rick.hillegas@gmail.com <ma...@gmail.com>> wrote:
>
>     On 7/14/17 6:21 PM, Shreyans Jain wrote:
>
>         If we have a ups and we properly shutdown the OS, will then we
>         have to disable write cache for the hard-disk in order to
>         prevent data corruption. Are there any chances left for the
>         data to be corrupted by power failure with write cache on?
>
>         Regards,
>         Shreyans Jain
>
>
>     That will reduce your risk. But operating systems can crash before
>     flushing the cache to disk.
>
>


Re: Write Cache - Data Corruption

Posted by Shreyans Jain <sh...@gmail.com>.
If we have write cache off, do we need a ups or some other power backup ?

On Sat, Jul 15, 2017 at 8:02 PM, Rick Hillegas <ri...@gmail.com>
wrote:

> On 7/14/17 6:21 PM, Shreyans Jain wrote:
>
>> If we have a ups and we properly shutdown the OS, will then we have to
>> disable write cache for the hard-disk in order to prevent data corruption.
>> Are there any chances left for the data to be corrupted by power failure
>> with write cache on?
>>
>> Regards,
>> Shreyans Jain
>>
>
> That will reduce your risk. But operating systems can crash before
> flushing the cache to disk.
>
>

Re: Write Cache - Data Corruption

Posted by Rick Hillegas <ri...@gmail.com>.
On 7/14/17 6:21 PM, Shreyans Jain wrote:
> If we have a ups and we properly shutdown the OS, will then we have to 
> disable write cache for the hard-disk in order to prevent data 
> corruption. Are there any chances left for the data to be corrupted by 
> power failure with write cache on?
>
> Regards,
> Shreyans Jain

That will reduce your risk. But operating systems can crash before 
flushing the cache to disk.