[osmosis-dev] Patch: ReplicationLagReader

Brett Henderson brett at bretth.com
Mon Jul 26 12:05:52 BST 2010


On Mon, Jul 26, 2010 at 7:40 PM, Peter Körner <osm-lists at mazdermind.de>wrote:

> Am 26.07.2010 10:01, schrieb Brett Henderson:
>
> > Hi Peter,
> >
> > You seem to have left my name as the author in some of the source
> > code.
> > Presumably that should be your name ;-)
> Yes, I think so ^^
>
>
> > Can you let me know what the purpose of this is?  Okay, I understand
> > that this is for "replication lag", but what is it comparing?  On
> > first read it appears to be comparing the latest server timestamp
> > from the local timestamp, but I can't see the local timestamp ever
> > being set.  Is that correct?
> It assumes a regular updated database using the rri-task. It compares the
> timstamp of he current state-file in the updating environment against the
> timestamp of the server's state-file and calculates the replication lag,
> that's the time the local database is behind the main database.
>

Ah, okay.  Now I get it.

I'm happy to apply it, just needs a few cleanups first.

   - If you run "ant clean all" from the replication directory you'll notice
   it fails at the checkstyle step (You may need to run "ant publish" from the
   root directory first).  Some code formatting needs to be cleaned up to fix
   the checkstyle errors.
   - Kinda picky, but while you're fixing the checkstyle errors, might be
   worth fixing some typos in the comments (locale->local, beeing->being, etc).
   - One comment states "If local state isn't available we need to copy
   server state to be the initial local state then exit.".  That comment has
   been copied from my code but it's not true for your implementation.  That
   threw me off course when reading it for the first time.
   - The munin config files can't live in the source tree.  They definitely
   won't be included in the final package if they're there, they'll only get
   embedded inside the osmosis-replication.jar file which isn't much help.
   They'll need to live in the "package" project somewhere.  There's already a
   "script" directory which gets bundled with the release, would a "munin"
   directory in there be appropriate?
   - And finally, once it's been committed you'll need to document it on the
   0.36 release wiki page
   http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.36 including
   references to the munin files.


Cheers,
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20100726/cc030d0b/attachment.html>


More information about the osmosis-dev mailing list