A kill -9 should not affect the OS's writing of dirty buffers (including directory modifications). If this were the case, massive system corruption would almost always occur every time a kill -9 was used with any program.

The only thing a kill -9 affects is user level buffering. The OS always maintains a consistent view of directory modifications and or file modification that were requesting by programs.

This entire discussion is pointless.

If the hardware is performing lazy writes, then corruption might be caused during a hard-reset (e.g. power failure, hardware failure (cpu lockup), or device driver failure in some VERY RARE cases). Even a kernel panic should allow the physical devices to flush their dirty buffers (as the controller can in many cases detect this).

The only way to prevent this is if the OS exposes a system call to synchronously force the hardware to flush any buffers. The Java fsync () could use the OS call to peform this operation, but most likely would not since the performance penalty would be significant, and those users requiring this level of reliability would be better served by using UPSs and fault-tolerant systems (at every level - CPU, disk, etc.).


On Sep 11, 2006, at 12:13 PM, Paul Elschot wrote:

On Monday 11 September 2006 15:36, Yonik Seeley wrote:
On 9/10/06, Chuck Williams <[EMAIL PROTECTED]> wrote:
Could a kill -9 prevent data from reaching disk for files that were
previously closed?

No.  After a close() the OS should have all the data... the process
may be killed but the OS will eventually flush all the buffers, etc.
File creation is pretty much always synchronous so I have no idea how
your problem could have happened (missing segment files). IO error or
something else temporarily filling up the disk?

"Pretty much always" is logically equivalent to "not always" :) , see also
below.

If you have a power loss or crash, then that *can* cause data loss.
There may be mount options to make more file operations synchronous,
or you could maybe write your own Directory implementation to make
things more synchronous.

New segments will have to be flushed/fsynced before the segments
file. This could be hidden in a Directory in case a Directory hides Lucene's
segments file.

Regards,
Paul Elschot


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to