History API is incomplete

Heiko Schlichting inn-workers at fu-berlin.de
Sun Jan 31 20:19:00 UTC 2010


Ok, this is not a small one and it's not for INN 2.5.2. Maybe it should
not be changed at all.

Few years ago I thought of implementing an alternate history mechanism(*)
to hisv6.

But looking into History API I noticed that things are incomplete and it is
only possible to write new history mechanisms which are very similar to
hisv6. This might be the reason why we have several storages to choose from
but only hisv6 as only history format.

At least the following looks incomplete to me (there is probably more):

- documentation: history(5) should mention that this is hisv6 only. It
  would be more consistent to name this manpage hisv6(5) but as the data
  are stored in a file named "history", renaming the manpage might be too
  confusing. History API is documentated in libinnhist(3).

- Some history related things are hard coded into INN avoiding History API:
  E.g., innd.c:

    i = dbzneedfilecount();
    if (!fdreserve(3 + i)) { /* TEMPORARYOPEN, history stats, INND_HISTORY and i */

- Creating a dbz-free history is difficult as makedbz and such things are
  called during expire without asking History API. All dbz related things
  should be moved into hisv6 source directory and should be started via
  History API or should check if "hismethod" is "hisv6" .

- "prunehistory" changes history as external program. It would much
  cleaner to define a "delhistory" command in ctlinnd analog to
  "addhistory" which already exists. BTW: I expect that using prunehistory
  during expire is running might undo the pruning.

Heiko

(*) Named HIH (hash indexed history). Describing it is a different story
    and could not be done in few lines. HIH takes advantage of changes
    happened to history since INN 1.x: Message IDs are replaced by hashes
    and file systems paths are replaced by storage tokens. Therefore today
    every line in history is of same length. At the time hisv6 was written,
    this was not true and history could be optimized today. HIH is
    selfexpiry as CNFS is for storage and does not need or use dbz. Of
    course, HIH is just a concept and not written code (although HIH could
    be very useful for storing the greylist database in postgrey too).

Heiko Schlichting          Freie Universität Berlin
heiko at CIS.FU-Berlin.DE     Zentraleinrichtung für Datenverarbeitung (ZEDAT)
Telefon +49 30 838-54327   Fabeckstraße 32
Telefax +49 30 838454327   14195 Berlin



More information about the inn-workers mailing list