[asterisk-bugs] [JIRA] (ASTERISK-24050) [patch] Improve AstDb I/O When Updating Rows

Joshua Colp (JIRA) noreply at issues.asterisk.org
Wed Jul 23 05:22:56 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp reopened ASTERISK-24050:
------------------------------------


This change has caused a regression. The test:

https://bamboo.asterisk.org/bamboo/browse/AST-ATTSCD-C632TE-474/test/case/2457931

Is failing due to it. I traced it down to the specific commit, upon reverting it the test now passes fine. Further examination shows that when the registration is refreshed it's not actually updated, causing the removal to remove the wrong contact which the test catches.

> [patch] Improve AstDb I/O When Updating Rows
> --------------------------------------------
>
>                 Key: ASTERISK-24050
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24050
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Core/AstDB
>    Affects Versions: Feature Tracker
>            Reporter: Michael L. Young
>            Assignee: Michael L. Young
>            Severity: Minor
>         Attachments: astdb-insert-update-io-help_trunk_v2.diff
>
>
> When updating a row, we are currently doing an INSERT OR REPLACE INTO.  The downside to this is that the row is deleted if it exists and then a new row is inserted.  So, we are hitting the disk twice.  One for the deletion and one for the insertion.
> The proposed patch will attempt to do an INSERT INTO and if it fails because a row with that key exists, we will ignore that.  Then we will attempt to perform an UPDATE on the existing row.  If a record was INSERTED, the UPDATE statement will end up doing nothing.
> Some testing that was performed on an older server with older IDE storage and few peers:
> _before patch_
> Re-Register | INSERT OR REPLACE INTO | Avg. 404 ms
> Register | INSERT OR REPLACE INTO | Avg. 442 ms
> _after patch_
> Re-Register | INSERT OR IGNORE; UPDATE | Avg. 361.5 ms
> Register | INSERT OR IGNORE; UPDATE | Avg 419 ms



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list