Re: dlr_mysql.c patch

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,

I don't think we should mark this as error, warning should be  
sufficient, and please fix indentation:
if (...)
     warning

auto-reconnect is enabled for mysql as default option (AFAIK). We  
trying to reconnect because if
mysql server is not available for say 2 minutes (e.g. restart of mysql  
daemon) then mysql reconnect feature
doesn't work but our reconnect will work.

Thanks,
Alexander Malysh

Am 14.10.2009 um 01:28 schrieb Nikos Balkanas:

> Gladly,
>
> It is something I found along the way and thought it might be useful  
> to others.  No biggie, though.
>
> We are returning error -1 from the database when connection or other  
> problem prevents the SQL from executing. In the same spirit I feel  
> it is appropriate to return error from the database when we try an  
> update limit 1 and 0 rows are affected.
>
> In a operational environment DLR mismatch could happen due to a lot  
> of causes, some of them unrelated to the database. This provides for  
> cleaner view of the source of the problem, than mismatch could  
> indicate.
>
> In our case we mismatch ~2% of the DLRs. We use a single SMSc,  
> SMPPbox, and use the default (literal) msg-id-type for that. In a  
> test run of 50000 MTs to FAKE smsc, only 20 DLRs were mismatched,  
> indicating that with real SMScs, insertion speed is not a factor.  
> From time 2 time we delete leftover DLRs from the database. Then an  
> EXPIRED DLR arrives and naturally is mismatched.
>
> If you see the logic in this, I could apply it to the rest of the  
> databases.
>
> BTW, I noticed that in dbpool-mysql.c if mysql_ping fails we  
> manually reconnect. Isn't it about time to use the auto-reconnect  
> option for mysql?
>
> BR,
> Nikos
>
> ----- Original Message ----- From: "Stipe Tolj" <[email protected]>
> Cc: <[email protected]>
> Sent: Wednesday, October 14, 2009 1:27 AM
> Subject: Re: dlr_mysql.c patch
>
>
>> Nikos Balkanas schrieb:
>>> Hi,
>>>
>>> A simple patch to help with missing dlrs when using mysql.
>>
>> Hi Nikos,
>>
>> I'm -0 for this patch. Can you comment on why it's needed and  
>> what's the
>> intention behind it?... in other words: try to sell it to us :)
>>
>> Stipe
>>
>> -- 
>> -------------------------------------------------------------------
>> KΓ¶lner Landstrasse 419
>> 40589 DΓΌsseldorf, NRW, Germany
>>
>> tolj.org system architecture      Kannel Software Foundation (KSF)
>> http://www.tolj.org/              http://www.kannel.org/
>>
>> mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
>> -------------------------------------------------------------------
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.