lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert engels <>
Subject Re: [jira] Commented: (LUCENE-1044) Behavior on hard power shutdown
Date Mon, 12 Nov 2007 18:41:45 GMT
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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message