hackers  

[freeipdb-hackers] Re: ipdbDoctor

Ben April
Thu, 18 Sep 2003 09:25:00 -0700

On Tue, Sep 16, 2003 at 11:54:12PM +0300, Ish-Lev Avshalom wrote:
> Can you make each check (or each related set of checks) as a subroutine, and
> allow this to be called as
> a library (i.e. "if ($0 =~ /ipdbDoctor$/) {CALL CHECKS}).
> this way we could insert those checks at the code itself whenever an
> operation is performed, and prevent those inconsistencies from happening (at
> least some of them...)

One of the things on my todolist is to add postgres rules
to prevent things from getting out of whack in the first place.

I'm also going to do more with transaction locking to help prevent issues.

> 
> ----- Original Message ----- 
> > From: "Anthony DeRobertis" <[EMAIL PROTECTED]>
> > To: "FreeIPdb Hackers" <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 16, 2003 7:31 PM
> > Subject: [freeipdb-hackers] ipdbDoctor
> >
> >
> > > Just wanted to let everyone know that I'm writing a new database
> > > consistency checker / repairer for freeipdb. I'm doing this because
> > > mine seems to have become quite inconsistent, and gone into
> > > self-destruct mode...
> > >
> > > It already finds many errors that the check script doesn't even think
> > > about. A partial list of what I'm checking for:
> > >
> > > o block is on a bit boundry
> > > o bits are in range (for the given address type)
> > > o children agree with parent. (childl/r vs. parent col)
> > > o check for blocks that appear to be ipv6 in ipv4 region or vice versa
> > > o check to make sure the region a block is in exists
> > > o check that parents have 0 or 2 children
> > > o check that children have appropriate # of bits
> > > o check that children have appropriate blocks
> > > o check that no node is the child of more than 1 parent
> > > o check that no node is the child of 0 parents
> > >
> > > Any suggestions for more?
> > >
> > > I'll be contributing the (rather long) perl script. Currently, its
> > > quite slow (makes thousands of db queries...) but that can be fixed.
> > >
> > > PS: The mailing list seems to allow posting to subscribers only... arg.
> > > Annoying. Third attempt to send using the right email address.
> > > Double-arg!
> > >
> > >
> >
> 
> 

-- 
Our doubts are traitors, 
And make us lose the good that we oft may win, 
By fearing to attempt                                   --William Shakespeare