Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed: Verified+1 by Jenkins Builder
Change subject: sqlite optimisation: Avoid unneeded database operation ......................................................................
sqlite optimisation: Avoid unneeded database operation
It is pointless to mark an SMS as sent immediatly before deleting it. Let's avoid the extra database overhead involved in doing this operation.
We change the db function which is used to delete SMS, changing the where clause, so let's also remove the word "sent" in the function name, now: db_sms_delete_message_by_id()
This function is only called from one place; when deleting sent messages, but better the name reflects what it actually does. On the same logic, the database statement is now called "DEL_BY_ID" and ends up being a duplicate of what was denoted as DEL_EXPIRED, so remove this later, which it itself has to do with the validity or expiration, but was called from delete_expired_sms(). Call the DEL_BY_ID statement there instead, which is a more accurate descrption of the actual statement being run.
The unit test is changed now that we cannot delete based on sent status anymore.
Change-Id: I777155c0f818b979c636bb59953719e472771603 --- M include/osmocom/msc/db.h M src/libmsc/db.c M src/libmsc/gsm_04_11.c M src/libmsc/sms_queue.c M tests/db_sms/db_sms_test.c M tests/db_sms/db_sms_test.ok 6 files changed, 12 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/40/28340/6