[asterisk-dev] [Code Review] Rework CDR API Internals to Prevent Loss of CDR Records

Russell Bryant russell at digium.com
Fri Feb 26 01:55:34 CST 2010


Leif Madsen wrote:

> This sounds very cool! Nice idea.
> 
> One thought I had when reading this was, "What happens if a backend is
> down for 
> a considerable amount of time, such as, forever? Could this lead to
> memory being 
> used up and eventually causing all memory to be used for storing
> queued up CDR records?"

This is absolutely correct.  The choice is between increased memory consumption or data loss.  I can't imagine anyone choosing data loss.  Otherwise, what's the point of having the records?

> If it could, perhaps there should be some sort of mechanism that an 
> administrator can use to either monitor or control how much memory
> gets used for caching?

The current code allows an administrator to see the queue length via the existing "cdr show status" CLI command.

One idea that your message made me think about is that perhaps instead of just an ERROR in the log when posting CDRs fails, we could allow a script to be run that could notify the administrator.  (Think externnotify for voicemail)

--
Russell Bryant
Digium, Inc. | Engineering Manager, Open Source Software
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org



More information about the asterisk-dev mailing list