[asterisk-dev] [Code Review]: app_queue: Support persisting and loading of long member lists

lathama reviewboard at asterisk.org
Mon Oct 1 11:37:18 CDT 2012



> On Oct. 1, 2012, 11:26 a.m., Mark Michelson wrote:
> > /branches/1.8/main/db.c, line 274
> > <https://reviewboard.asterisk.org/r/2136/diff/3/?file=31581#file31581line274>
> >
> >     I recommend adding doxygen to this new function.

Thanks Mark, I am working on ASTERISK-20259 and like to see that someone still cares. 


- lathama


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2136/#review7169
-----------------------------------------------------------


On Oct. 1, 2012, 9:23 a.m., Sean Bright wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2136/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2012, 9:23 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Greenlight in #asterisk brought up that he was receiving an error message "Could not create persistent member string, out of space" when running app_queue in Asterisk 10.  dump_queue_members() made an assumption that 8K would be enough to store the generated string, but with queues that have large member lists this is not always the case.  This patch removes the limitation and uses ast_str instead of a fixed sized buffer.
> 
> The complicating factor comes from the fact that ast_db_get requires a buffer and buffer size argument, which doesn't let us pull back more than what we pass in, so I introduced a new ast_db_get_allocated() which returns an ast_strdup()'d copy of the value from astdb.
> 
> As an aside, I did some testing on the maximum size of data that we can store in the BDB library we distribute and was able to store a 10MB string and retrieve it with no problems, so I feel this is a safe patch.
> 
> A similar patch will go into 10, 11, and trunk.
> 
> This already has a "Ship It" but I would like a secondary review since I updated the diff.  I'm not sure that the ast_assert that I added in ast_db_get is a safe change.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/tests/test_db.c 374095 
>   /branches/1.8/main/db.c 374095 
>   /branches/1.8/include/asterisk/astdb.h 374095 
>   /branches/1.8/apps/app_queue.c 374095 
> 
> Diff: https://reviewboard.asterisk.org/r/2136/diff
> 
> 
> Testing
> -------
> 
> Compiles and basic functional testing.
> 
> 
> Thanks,
> 
> Sean
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121001/04402a42/attachment.htm>


More information about the asterisk-dev mailing list