[Patch] Internal DLR storage gets confused on higher throughput
Enver ALTIN <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Parkyeri |
| Message-ID | <[email protected]> |
Hi,
I have very fast access to an SMSC for testing purposes, and I think I
have discovered an interesting problem in internal DLR storage.
I have limited the throughput to 1 message per second and encountered no
problems with the internal DLR storage; but somehow when I push it
harder to the top speed, I think the internal storage gets confused.
Here is a small snap of what I get in the *Apache* access_log, when I
limit the throughput to 1/sec:
127.0.0.1 - - [13/Sep/2004:19:12:26 +0300] "GET /~skyblue/update-dlr.php?id=204&status=8 HTTP/1.1" 200 21
127.0.0.1 - - [13/Sep/2004:19:12:26 +0300] "GET /~skyblue/update-dlr.php?id=204&status=4 HTTP/1.1" 200 21
127.0.0.1 - - [13/Sep/2004:19:12:27 +0300] "GET /~skyblue/update-dlr.php?id=205&status=8 HTTP/1.1" 200 21
127.0.0.1 - - [13/Sep/2004:19:12:27 +0300] "GET /~skyblue/update-dlr.php?id=205&status=4 HTTP/1.1" 200 21
127.0.0.1 - - [13/Sep/2004:19:12:28 +0300] "GET /~skyblue/update-dlr.php?id=206&status=8 HTTP/1.1" 200 21
127.0.0.1 - - [13/Sep/2004:19:12:28 +0300] "GET /~skyblue/update-dlr.php?id=206&status=4 HTTP/1.1" 200 21
and here is another somewhat small snap of what I get (demonstrating how
it gets confused) in the *Apache* access_log, when there's no throughput
limiting:
127.0.0.1 - - [13/Sep/2004:19:33:22 +0300] "GET /~skyblue/update-dlr.php?id=40&status=8 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:22 +0300] "GET /~skyblue/update-dlr.php?id=326&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:22 +0300] "GET /~skyblue/update-dlr.php?id=326&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:22 +0300] "GET /~skyblue/update-dlr.php?id=64&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=326&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=64&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=326&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=326&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=64&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=64&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=64&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:23 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:24 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:24 +0300] "GET /~skyblue/update-dlr.php?id=326&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:24 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:24 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
127.0.0.1 - - [13/Sep/2004:19:33:25 +0300] "GET /~skyblue/update-dlr.php?id=43&status=4 HTTP/1.1" 200
Patch attached.
Cheers,
--
Enver ALTIN | http://skyblue.gen.tr/
Software developer @ Parkyeri | http://www.parkyeri.com/
dlr_mem.patch
(text/x-patch, 1.4 KB)
Index: ChangeLog
===================================================================
RCS file: /home/cvs/gateway/ChangeLog,v
retrieving revision 1.2554
diff -u -p -d -r1.2554 ChangeLog
--- ChangeLog 10 Sep 2004 20:11:26 -0000 1.2554
+++ ChangeLog 13 Sep 2004 17:12:11 -0000
@@ -1,3 +1,7 @@
+2004-09-13 Enver ALTIN <skyblue at skyblue.gen.tr>
+ * gw/dlr_mem.c: Fixed internal DLR matching problem (compare the
+ destination too).
+
2004-09-10 Alexander Malysh <amalysh at kannel.org>
* gwlib/gwlib.h: added 'gw-prioqueue.h'. fixed compile error.
Index: gw/dlr_mem.c
===================================================================
RCS file: /home/cvs/gateway/gw/dlr_mem.c,v
retrieving revision 1.7
diff -u -p -d -r1.7 dlr_mem.c
--- gw/dlr_mem.c 8 Aug 2004 19:50:18 -0000 1.7
+++ gw/dlr_mem.c 13 Sep 2004 17:12:11 -0000
@@ -122,10 +122,7 @@ static void dlr_mem_add(struct dlr_entry
*/
static int dlr_mem_entry_match(struct dlr_entry *dlr, const Octstr *smsc, const Octstr *ts, const Octstr *dst)
{
- /* XXX: check destination addr too, because e.g. for UCP is not enough to check only
- * smsc and timestamp (timestamp is even without milliseconds)
- */
- if(octstr_compare(dlr->smsc,smsc) == 0 && octstr_compare(dlr->timestamp,ts) == 0)
+ if(octstr_compare(dlr->smsc,smsc) == 0 && octstr_compare(dlr->timestamp,ts) == 0 && octstr_compare(dlr->destination,dst) == 0)
return 0;
return 1;
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBRdURZCB2FZvqK0sRAjSNAJ9UG5iMIOY+C3TRc7iD8cjo/A/vcACeJhhR ntAVUykFJ1LYJtM/SxxE7lw= =KJ4f -----END PGP SIGNATURE-----