XOVER ranges

Russ Allbery rra at stanford.edu
Fri Apr 4 16:51:38 UTC 2008

"Jeffrey M. Vinocur" <jeff at litech.org> writes:

> I was going to go ahead and do this, but I had trouble understanding why 
> you thought we might ever need to remap in the middle of a search.

I don't remember either and my Subversion commit message wasn't
particularly informative.

> Right now you check for a stale high watermark when the search is opened
> and remap the index file, and then during the search you check for data
> file offsets that are past the end and remap the data file there.
> I thought about just updating the open code to remap both if it found a
> stale watermark, but I suppose that potentially we could get in trouble
> there if there's a write to the data file that hasn't flushed yet?  We
> could try checking during open to make sure the data file entry
> corresponding to the high watermark is within the mapped region, but I
> don't know what we would do if it isn't.

Yeah, at least in theory, one could have multiple searches open, so just
because you're calling opensearch doesn't mean that it's safe to remap.
In practice, I'm pretty sure nothing does that and if opensearch is
called, all the other searches are complete and we can remap whatever we

Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.

More information about the inn-workers mailing list