Attention is currently required from: fixeria, pespin.

keith has posted comments on this change by keith. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email )

Change subject: sqlite optimisation: Avoid unneeded database operation
......................................................................


Patch Set 5:

(1 comment)

File src/libmsc/db.c:

https://gerrit.osmocom.org/c/osmo-msc/+/28340/comment/766d0755_3d775ae1?usp=email
 :
PS4, Line 303: DB_STMT_SMS_DEL_EXPIRED
> I believe this was already brought up here by other reviewers: we now have 
> two identical queries in  […]
It was in relation to a different "duplicate" which wasn't really a duplicate. 
Anyway, I didn't notice this one, and I see now. You are correct, these are two 
essentially the same queries.

I'd prefer to keep you happy in this patch. I can remove the LIMIT clause.
I'd also say that  DB_STMT_SMS_DEL_*EXPIRED* is inaccurate, there's nothing in 
the query that limits it to "expired" SMS.

I'd propose to get rid of this one (EXPIRED) an replace its use in the code 
with the other one, just plain old: DB_STMT_SMS_DEL_BY_ID

By the way, I feel you're nitpicking a little :-) It's OK and I appreciate it, 
but let me just say that the state of the SMS database (and the insane beast 
that is the code that interacts with it) is hardly something perfect to be 
precious about.
It's likely nobody else has ever run this code with 10s of SMS per second going 
on. Believe me, I've scrutinised it. I think it was probably initially hacked 
quickly into nitb at a CCC event or something.

You know, like.. we define a column as TIMESTAMP and yet it is, after all, 
sqlite3 :-)



--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28340?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I777155c0f818b979c636bb59953719e472771603
Gerrit-Change-Number: 28340
Gerrit-PatchSet: 5
Gerrit-Owner: keith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <[email protected]>
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Tue, 14 Oct 2025 00:37:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <[email protected]>

Reply via email to