I think it would be great if it where an option. Perhaps even a sandbox
implementation that could wrap or replace a few classes. Maybe that
complicates things too much, but that way you could just not use the
transaction system if you where on NFS (if that ends up being a problem)
or you didn't want to pay a performance cost.
Maybe a Derby guy would pitch in.
Chris Hostetter wrote:
: This is simple not true. See FileDescriptor.sync().
:
: There are several options, but normally it is used so that when close
: completes, all data must be on disk. This is a much slower way to write data.
: It is very common in database systems when committing the log file.
Ok. I'll certainly take your word for it ... i've been trusting the docs
for [File]OutputStream.flush()...
If the intended destination of this stream is an abstraction provided
by the underlying operating system, for example a file, then flushing
the stream guarantees only that bytes previously written to the stream
are passed to the operating system for writing; it does not guarantee
that they are actually written to a physical device such as a disk drive.
I haven't looked at the internals of FileOutputStream or FileDescriptor on
any particular platforms to see how exactly they work, but if dealing with
the FD directly and using FD.sync() the magic bullet then I'd love to see
a patch that uses it in FSDirectory.
I assume the SyncFailedException it throws is rare? If it is always
thrown when using things like NFS that may be a show stopper for using
sync() in Lucene ... many people have jumped through a lot of hoops this
past year to get Lucene working on NFS; I'd hate to see all that work go
out the window in an effort to make Lucene ACID. (I suspect there are
more users interested in using Lucene on NFS then on using it as a
transactional data store)
Throws:
SyncFailedException - Thrown when the buffers cannot be flushed, or
because the system cannot guarantee that all the buffers have been
synchronized with physical media.
-Hoss
---------------------------------------------------------------------
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]