[asterisk-dev] [Code Review] 3841: Fix Regression From AstDB I/O Performance Improvement Patch

Michael Young reviewboard at asterisk.org
Thu Jul 24 15:48:01 CDT 2014



> On July 24, 2014, 9:57 a.m., Joshua Colp wrote:
> > What is the impact of doing this performance wise? Is it still better than before?

I was having the same thoughts as you and was doing some testing to see if there are any gains anymore from the patch.

With my testing, I am sad to say, that it would appear I was going down the wrong path.  At least on a very lightly loaded system, there was not much gain.  It would actually appear to be better to just stay with what we had before the patch was put in than to do the SELECT then UPDATE.

I wish I could find the information that I had read many months back that lead me down this path of trying to optimize this one statement to try and get some better performance.

At this point, I think it is best to revert the patch all together.


- Michael


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


On July 23, 2014, 1:21 p.m., Michael Young wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3841/
> -----------------------------------------------------------
> 
> (Updated July 23, 2014, 1:21 p.m.)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Bugs: ASTERISK-24050
>     https://issues.asterisk.org/jira/browse/ASTERISK-24050
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The CI testing found a regression with the last patch.  Yea!  The UPDATE was not functioning as expected.  I am pretty sure I tested UPDATES but obviously missed something.
> 
> sqlite3_prepare() does not handle multiple SQL statements in a single call.  If there are more than one present, it will only use the first statement and ignore the rest.
> 
> This patch separates the INSERT INTO and the UPDATE into two separate statements for use by sqlite3_prepare.  These two statements are then run when ast_db_put() is called.
> 
> 
> Diffs
> -----
> 
>   /trunk/main/db.c 419309 
> 
> Diff: https://reviewboard.asterisk.org/r/3841/diff/
> 
> 
> Testing
> -------
> 
> I turned on tracing in order to see this problem and also to confirm that this patch was functioning again as expected. 
> 
> I ran the testsuite test that was failing before the patch and then after the patch to confirm that the test no passes as well.
> 
> 
> Thanks,
> 
> Michael Young
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140724/5037b4e0/attachment.html>


More information about the asterisk-dev mailing list