CURRENT branch

Julien ÉLIE julien at trigofacile.com
Mon May 18 06:52:11 UTC 2009


Hi Russ,

> I think what your current fix will do is force the file to be remapped
> any time any article write has happened except for a write at the
> high-water mark and a search or article read that isn't at the
> high-water mark.

Yes, that's it.
If an overview data contains article numbers:

 2 - 3 - 9 - 6 - 4

in that order.  Then remapping is done when an article whose number
is < 9 is written.  It should not happen in normal overview use
since the numbers are increasing.

Remapping is also done before the start of a search in case
the mapped file only contains:

 2 - 3

and we are searching in the range 2-15.  As we know that the high
water mark is 9, we remap in order to find 2,3,9,6,4.
If we were searching in the range 2-6, there would not have been
any problem (because the file would already have been remapped
after the arrival of #6, following #9).


> I think that the patch does more than is necessary.  It should be fine
> if we fill in a hole in the overview below high

Yes it would be better.  Though I do not see either tdx_data_store
or tdx_data_add searching for such a hole (we have to find one,
and of a sufficient length).


> The problem, and what I suspect the test
> is triggering, is when we've *rebased* the overview because we wrote
> below the overview base number rather than just anything below the
> high-water mark.

You're right; the overview data is "repacked" in this case.


> I suspect that if we just remapped when we rebased,
> that would also solve the problem.
> We still break the guarantee of OVSTATICSEARCH if there's an outstanding
> search, though.  I wonder if we should really keep track of whether
> there's an open search and change behavior in that case.

Remapping is done only when an open search is wanted (and after it begins).
When there is a rebase, remapping will currently be done and also if
there is an outstanding search.
I do not see well what you prefer to do (except for filling overview holes
when possible).

-- 
Julien ÉLIE

« Non licet omnibus adire Corinthum. » (proverbe issu du grec) 




More information about the inn-workers mailing list