You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jeff Trawick <tr...@gmail.com> on 2012/09/28 20:44:42 UTC

[PATCH] fix bad tto parameter to apr_memcache_server_create()

Index: libsvn_subr/cache-memcache.c
===================================================================
--- libsvn_subr/cache-memcache.c	(revision 1391584)
+++ libsvn_subr/cache-memcache.c	(working copy)
@@ -470,7 +470,8 @@
                                        0,  /* min connections */
                                        5,  /* soft max connections */
                                        10, /* hard max connections */
-                                       50, /* connection time to live (secs) */
+                                       apr_time_from_sec(50), /*
connection time
+                                                               * to live */
                                        &server);
   if (apr_err != APR_SUCCESS)
     {

The ttl is in microseconds, not seconds.

I haven't compiled it!  (Is it conceivable that apr_time.h isn't available?)

This is related to APR bug 51511, which I mistakenly took as an APR bug.

https://issues.apache.org/bugzilla/show_bug.cgi?id=51511

Fold spindle or mutilate as desired!

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: [PATCH] fix bad tto parameter to apr_memcache_server_create()

Posted by "C. Michael Pilato" <cm...@collab.net>.
...and proposed for backport to 1.7.7.

On 09/28/2012 04:35 PM, C. Michael Pilato wrote:
> Looks good.  Committed in r1391641.
> 
> On 09/28/2012 02:44 PM, Jeff Trawick wrote:
>> Index: libsvn_subr/cache-memcache.c
>> ===================================================================
>> --- libsvn_subr/cache-memcache.c	(revision 1391584)
>> +++ libsvn_subr/cache-memcache.c	(working copy)
>> @@ -470,7 +470,8 @@
>>                                         0,  /* min connections */
>>                                         5,  /* soft max connections */
>>                                         10, /* hard max connections */
>> -                                       50, /* connection time to live (secs) */
>> +                                       apr_time_from_sec(50), /*
>> connection time
>> +                                                               * to live */
>>                                         &server);
>>    if (apr_err != APR_SUCCESS)
>>      {
>>
>> The ttl is in microseconds, not seconds.
>>
>> I haven't compiled it!  (Is it conceivable that apr_time.h isn't available?)
>>
>> This is related to APR bug 51511, which I mistakenly took as an APR bug.
>>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=51511
>>
>> Fold spindle or mutilate as desired!
>>
> 
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development


Re: [PATCH] fix bad tto parameter to apr_memcache_server_create()

Posted by "C. Michael Pilato" <cm...@collab.net>.
Looks good.  Committed in r1391641.

On 09/28/2012 02:44 PM, Jeff Trawick wrote:
> Index: libsvn_subr/cache-memcache.c
> ===================================================================
> --- libsvn_subr/cache-memcache.c	(revision 1391584)
> +++ libsvn_subr/cache-memcache.c	(working copy)
> @@ -470,7 +470,8 @@
>                                         0,  /* min connections */
>                                         5,  /* soft max connections */
>                                         10, /* hard max connections */
> -                                       50, /* connection time to live (secs) */
> +                                       apr_time_from_sec(50), /*
> connection time
> +                                                               * to live */
>                                         &server);
>    if (apr_err != APR_SUCCESS)
>      {
> 
> The ttl is in microseconds, not seconds.
> 
> I haven't compiled it!  (Is it conceivable that apr_time.h isn't available?)
> 
> This is related to APR bug 51511, which I mistakenly took as an APR bug.
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51511
> 
> Fold spindle or mutilate as desired!
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development