[Home]

Summary:ASTERISK-04784: [patch] [post 1.2] Added support to cdr_pgsql.c to spool queries when lost database connection
Reporter:Corey Frang (gnarf)Labels:
Date Opened:2005-08-05 14:47:02Date Closed:2005-12-23 16:21:42.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:CDR/cdr_pgsql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cdr_pgsql.c.txt
Description:Added a "spool file" to cdr_pgsql.conf:

spool=pgsql.spool

When the connection to the database is lost or an error occurs to a query, it will write the query to /var/log/asterisk/pgsql.spool .  When the connection comes back up, it will read all the querys written and execute them, then delete the file.
Comments:By: Corey Frang (gnarf) 2005-08-05 14:57:42

cdr_pgsql.c.txt is the proper version of the patch file, sorry about the first one

By: Corey Frang (gnarf) 2005-08-05 16:10:01

I faxed in my disclaimer, in case your going to merge this into head.

By: drmac (drmac) 2005-08-23 08:38:21

I believe the cdr module in general now supports spooling. There is another patch on mantis to add this support to cdr_mysql. Perhaps it would be better to generalize this spooling into cdr.c instead of each doing their own thing.

By: Kevin P. Fleming (kpfleming) 2005-08-23 10:50:33

The CDR core already supports batching and background posting. I see no need to provide additional spooling support in the CDR driver modules themselves.

By: Michael Jerris (mikej) 2005-08-28 10:19:04

Is there a reason this is still open if we are planning on using the cdr core spooling going forward?  Does this add any value that is not in the cdr core spooling funtionality?

By: cmaj (cmaj) 2005-10-14 10:48:34

When the DB connection dies, the background post will fail just like a regular post.  Sleeping the posting thread on failure from backend modules would chew up memory and still not help when asterisk terminates unexpectedly.

Perhaps make this patch generic by including a priority for CDR modules via a list in cdr.conf ?  Then make the default failure to cdr_csv in all cases.

By: Tilghman Lesher (tilghman) 2005-12-23 16:21:15.000-0600

Core spooling supercedes.  Closed.