CURRENT branch

Julien ÉLIE julien at
Mon May 18 17:43:52 UTC 2009

Hi Russ,

> I believe that in the out-of-order write case, it's only
> necessary to remap the data, not the index.
>     if ((end > data->high && high > data->high) || data->remapoutoforder) {
>        data->remapoutoforder = false;
>        unmap_data(data);
>    }
>    if (end > data->high && high > data->high) {
>        unmap_index(data);
>        map_index(data);
>        data->high = high;
>    }

Yes, we do not need to remap the index.  Your rewrite here is better
to fix the issue.

> Or, even more simply, just set a flag whenever we do any writes to the
> overview at all and always remap the data in that case, but keep the
> previous logic for when to remap the index.

But then, we would also do more than we have to.  If 1-6 are mapped,
article #7 arrives and I search in the range 3-6, there is no need
to remap the data file.

Julien ÉLIE

« La femme a la passion du calcul : elle divise son âge par deux,
  double le prix de ses robes, triple les appointements de son mari
  et ajoute cinq ans à l'âge de sa meilleure amie. » (Marcel Achard)

More information about the inn-workers mailing list