[asterisk-dev] losing CDRs on mysql backend

Juan Pablo Abuyeres jpabuyer at tecnoera.com
Fri Jun 2 07:19:09 MST 2006


I think someone was confused about cdr_addon_mysql's spooling feature. I
believe they confused it with CDR's batching feature, thus they said
it's wasn't needed on mysql backend, because it's in CDR itself. But
they are completely different things.

What cdr_addon_mysql spooling does is spooling _failed to insert into
mysql database_ records. CDR itself doesn't have the chance of spooling
records once they are submitted to backends, so if we are going to care
about records that couldn't make it into the mysql database because the
mysql server was unwired, that has to be done into cdr_addon_mysql
backend.

Joseph, do you have a patch against asterisk-addons-1.2.2 to add
spooling into cdr_addon_mysql? Would you sent it to me please?

JP


On Thu, 2006-06-01 at 17:50 -0400, Joseph Benden wrote:
> Hello,
> 
> This conversation was dropped in the past as someone felt the spooling
> native to 1.2.x would handle the situation.  However; the opposite is
> true.  The code in cdr_addon_mysql will not report back to any calling
> code as to whether the database operation happened successfully.  Thus
> losing CDRs is a true reality.  Personally, I've been using my
> original patch whereby I spool the records to a file.  This change was
> not accepted for CVS HEAD at that time.
> 
> The way to tell if you are losing records is to run the Perl CSV (in
> the bug id) import tool, taking a count before hand, and afterwords.
> If you've got more records, then you lost some.  However, getting the
> records that fell out would require more work.  However the major
> reason for CDR loss stems from the database disappearing.
> 
> I have never researched the other real-time cdr modules.  Thus I can
> not speak for the other ones.
> 
> -Joe
> Thralling Penguin LLC
> 
> 
> On Thu, 2006-06-01 at 23:29 +0200, Matt Riddell (IT) wrote: 
> > Juan Pablo Abuyeres wrote:
> > > Hi,
> > > 
> > > I am losing CDR records on my MySQL backend. I just compared CSV records
> > > with MySQL's and I was surprised with the difference. Searching a bit, I
> > > hit this bug: http://bugs.digium.com/view.php?id=4953
> > > 
> > > Questions:
> > > 
> > > 1.- kpfleming says "The spooling issue will continue to be a problem for
> > > v1-0 users, but HEAD (and v1-2) users can use the built-in spooling in
> > > the CDR engine.". That "built-in spooling" has to be enabled somewhere
> > > or is it automatic?
> > > 
> > > 2.- If there is a built-in spooling into CDR itself and there is no
> > > spooling in cdr_addon_mysql, when the mysql server is down, crashed,
> > > full, unwired, firewalled, or whatever.. is built-in spooling in CDR
> > > itself supposed to handle that??
> > > 
> > > I'm using asterisk-1.2.7.1 and asterisk-addons-1.2.2
> > 
> > Is there any way that we can tell which cdr records have been lost?  Is
> > there an error in the console?  Does this apply to all realtime cdr
> > operations i.e. postgres, odbc etc or just MySQL?
> > 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list