OO Report 2

David Relson relson at osagesoftware.com
Mon Jan 31 05:31:00 CET 2005


Matthias,

The OO code for traditional vs transaction operation is in CVS and "make
check" passes in both modes for Berkeley DB.  Since it's working, we're
ready for the next phase(s).

1) Code review:   Likely there's excess, unneeded code.  That's not yet
been checked for.  

2) There were two spots in database_db.c where I combined/simplified
some complex conditional logic.  AFAICT they work properly, but problems
may have been introduced.  The two areas are bracketed with "Begin
complex change ..." and "End complex change" comments.

3) In datastore_db_private.h, struct dbh_t includes a "dsm_t *dsm"
element.  Likely this can be deleted and the global variable "dsm_t
*dsm" used instead.  Making that work will involve cleaning up and
reordering of the datastor*.h header files. 

4) Method names:  room for improvement!  One thought is to remove the
"dsm_" prefix for the method names.  Actually the names of all the
methods are open to revision.

5) Method ordering:  the methods in the dsm_t struct (in the header
file) and in the code files may be easier to work with if they're
ordered differently. 

6) File names:  I'm sure there are better names for the new code files
than datastore_db_trad.c and datastore_db_trans.c. Perhaps, using _txn.c
and non_txn.c would be better.  I'm open to suggestions.

The new code at in the "functioning, rough draft" stage.  With luck, all
the issues with the new code are cosmetic, rather than functional.  The
code restructuring was the biggest task, AFAICT.  The next step is
review and cleanup.

That's all I can think of at the moment :-)

Ciao,

David

P.S.  For those of you who want to test the new code, it can be checked
out with these commands:

  CVSROOT="pserver:anonymous at cvs.sourceforge.net:/cvsroot/bogofilter"
  cvs -d:$CVSROOT login
  cvs -z3 -d:$CVSROOT co -r RTS bogofilter

When prompted for a password, just hit the enter key.




More information about the bogofilter-dev mailing list