[Xapian-tickets] [Xapian] #278: When changesets are being generated, old changesets aren't cleaned up

Xapian nobody at xapian.org
Fri Mar 11 01:24:44 GMT 2011


#278: When changesets are being generated, old changesets aren't cleaned up
---------------------------+------------------------------------------------
 Reporter:  richard        |       Owner:  richard  
     Type:  defect         |      Status:  assigned 
 Priority:  low            |   Milestone:  1.2.x    
Component:  Backend-Chert  |     Version:  SVN trunk
 Severity:  normal         |    Keywords:           
Blockedby:                 |    Platform:  All      
 Blocking:                 |  
---------------------------+------------------------------------------------

Comment(by olly):

 I applied a similar change to factor out MAX_OPEN_RETRIES in r15377.

 Otherwise this mostly looks good, though I didn't try it yet.  A few
 comments:

  * If the changeset file is successfully unlinked, then oldest_changeset
 isn't updated so I think this will loop forever after successfully
 removing an old changeset.  I think you just want to move the line which
 increments it down a line so it is outside the if statement.

  * I would keep the total document length last (if only because otherwise
 the comment about why it is last is confusing).

  * There's no need for the str() here (or similar cases) - this is
 iostream style so numeric types can just be written directly:

  {{{
 #!cpp
 LOGLINE(DB, "Removed changeset " << str(oldest_changeset));
  }}}

  * Using '{ }' rather than ';' for an empty loop body is a bit more
 visible, so we prefer that (I've actually documented this convention in
 r15379).

  * There's whitespace added to a blank line in xapian-
 core/backends/brass/brass_database.h - we try to avoid adding trailing
 whitespace and other whitespace irregularities (some existing code has it,
 which we've resisted wholesale fixing as svn blame regards it as a
 significant change).

  * The indent of the conditional #include in brass_version.cc was
 intentional (for more complex cases, it's easier to read with the indent).

-- 
Ticket URL: <http://trac.xapian.org/ticket/278#comment:11>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list