dlr_mysql.c patch

View: New views
8 Messages — Rating Filter:   Alert me  

dlr_mysql.c patch

by Nikos Balkanas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
 
A simple patch to help with missing dlrs when using mysql.
 
BR,
Nikos


dlr_mysql.diff (1K) Download Attachment

Re: dlr_mysql.c patch

by Stipe Tolj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
-------------------------------------------------------------------


Re: dlr_mysql.c patch

by Nikos Balkanas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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" <st@...>
Cc: <devel@...>
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
> -------------------------------------------------------------------
>



Re: dlr_mysql.c patch

by Alexander Malysh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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" <st@...>
> Cc: <devel@...>
> 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
>> -------------------------------------------------------------------
>
>



Re: dlr_mysql.c patch

by Nikos Balkanas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here you go. Sorry for the delay, got caught up with my work. I expanded to
rest of dbs and to insert and delete statements.

BR,
Nikos
----- Original Message -----
From: "Alexander Malysh" <amalysh@...>
To: "Nikos Balkanas" <nbal@...>
Cc: <devel@...>
Sent: Wednesday, October 14, 2009 10:25 AM
Subject: Re: dlr_mysql.c patch


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" <st@...>
> Cc: <devel@...>
> 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
>> -------------------------------------------------------------------
>
>






dlr_mssql.diff (2K) Download Attachment
dlr_mysql.diff (2K) Download Attachment
dlr_oracle.diff (2K) Download Attachment
dlr_pgsql.diff (1K) Download Attachment
dlr_sdb.diff (1K) Download Attachment

Re: dlr_mysql.c patch

by Alexander Malysh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Niko,

could you please send this as one patch because it's too difficult to  
review?

Thanks,
Alexander Malysh

Am 22.10.2009 um 01:30 schrieb Nikos Balkanas:

> Here you go. Sorry for the delay, got caught up with my work. I  
> expanded to rest of dbs and to insert and delete statements.
>
> BR,
> Nikos
> ----- Original Message ----- From: "Alexander Malysh" <amalysh@...
> >
> To: "Nikos Balkanas" <nbal@...>
> Cc: <devel@...>
> Sent: Wednesday, October 14, 2009 10:25 AM
> Subject: Re: dlr_mysql.c patch
>
>
> 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" <st@...>
>> Cc: <devel@...>
>> 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
>>> -------------------------------------------------------------------
>>
>>
>
> <
> dlr_mssql
> .diff><dlr_mysql.diff><dlr_oracle.diff><dlr_pgsql.diff><dlr_sdb.diff>



Re: dlr_mysql.c patch

by Nikos Balkanas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here you go.

BR,
Nikos
----- Original Message -----
From: "Alexander Malysh" <amalysh@...>
To: "Nikos Balkanas" <nbalkanas@...>
Cc: <devel@...>
Sent: Thursday, October 22, 2009 11:06 AM
Subject: Re: dlr_mysql.c patch


Hi Niko,

could you please send this as one patch because it's too difficult to
review?

Thanks,
Alexander Malysh

Am 22.10.2009 um 01:30 schrieb Nikos Balkanas:

> Here you go. Sorry for the delay, got caught up with my work. I  expanded
> to rest of dbs and to insert and delete statements.
>
> BR,
> Nikos
> ----- Original Message ----- From: "Alexander Malysh" <amalysh@...
> >
> To: "Nikos Balkanas" <nbal@...>
> Cc: <devel@...>
> Sent: Wednesday, October 14, 2009 10:25 AM
> Subject: Re: dlr_mysql.c patch
>
>
> 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" <st@...>
>> Cc: <devel@...>
>> 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
>>> -------------------------------------------------------------------
>>
>>
>
> < dlr_mssql
> .diff><dlr_mysql.diff><dlr_oracle.diff><dlr_pgsql.diff><dlr_sdb.diff>


kannel.diff (10K) Download Attachment

Re: dlr_mysql.c patch

by Alexander Malysh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

commited to cvs.

Thanks,
Alexander Malysh

Am 22.10.2009 um 13:39 schrieb Nikos Balkanas:

> Here you go.
>
> BR,
> Nikos
> ----- Original Message ----- From: "Alexander Malysh" <amalysh@...
> >
> To: "Nikos Balkanas" <nbalkanas@...>
> Cc: <devel@...>
> Sent: Thursday, October 22, 2009 11:06 AM
> Subject: Re: dlr_mysql.c patch
>
>
> Hi Niko,
>
> could you please send this as one patch because it's too difficult to
> review?
>
> Thanks,
> Alexander Malysh
>
> Am 22.10.2009 um 01:30 schrieb Nikos Balkanas:
>
>> Here you go. Sorry for the delay, got caught up with my work. I  
>> expanded to rest of dbs and to insert and delete statements.
>>
>> BR,
>> Nikos
>> ----- Original Message ----- From: "Alexander Malysh" <amalysh@...
>> >
>> To: "Nikos Balkanas" <nbal@...>
>> Cc: <devel@...>
>> Sent: Wednesday, October 14, 2009 10:25 AM
>> Subject: Re: dlr_mysql.c patch
>>
>>
>> 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" <st@...>
>>> Cc: <devel@...>
>>> 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
>>>> -------------------------------------------------------------------
>>>
>>>
>>
>> <  
>> dlr_mssql
>>  .diff
>> ><dlr_mysql.diff><dlr_oracle.diff><dlr_pgsql.diff><dlr_sdb.diff>
> <kannel.diff>