Would it not be simpler to pure Java...
Add the descriptor that needs to be sync'd (and closed) to a Queue.
Start a Thread to sync/close descriptors.
In commit(), wait for all sync threads to terminate using join().
On Nov 12, 2007, at 12:34 PM, Doug Cutting wrote:
robert engels wrote:
I don't think this would be any difference performance wise, and
might actually be slower.
When you call FD.sync() it only needs to ensure the dirty blocks
associated with that descriptor need to be saved.
The potential benefit is that you wouldn't have to wait for things
to be written as you close files. So, with write-behind, data
could be written while the CPU moves on to other tasks, only
blocking at commit. With log-based filesystems, only the log need
be flushed, and batching that is a performance win. However, if
there are lots of other applications writing at the same time, and
the Lucene update is small, it could in theory slow things, but my
hunch is that it would in practice frequently nearly eliminate the
cost of syncing.
Doug
---------------------------------------------------------------------
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]