You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2014/04/19 22:21:01 UTC

svn commit: r1588704 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.c

Author: covener
Date: Sat Apr 19 20:21:01 2014
New Revision: 1588704

URL: http://svn.apache.org/r1588704
Log:
Fix errors with CacheLock on Windows:

cache_util.c(757): (OS 80)The file exists.  : [client 127.0.0.1:63889] 
AH00784: Attempt to obtain a cache lock for stale cached URL failed, 
revalidating entry anyway: 

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/cache/cache_util.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1588704&r1=1588703&r2=1588704&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sat Apr 19 20:21:01 2014
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive
+     is enabled.  [Eric Covener]
+
   *) mod_proxy: Preserve original request headers even if they differ
      from the ones to be forwarded to the backend. PR 45387.
      [Yann Ylavic]

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=1588704&r1=1588703&r2=1588704&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Sat Apr 19 20:21:01 2014
@@ -240,7 +240,7 @@ CACHE_DECLARE(apr_int64_t) ap_cache_curr
  * Try obtain a cache wide lock on the given cache key.
  *
  * If we return APR_SUCCESS, we obtained the lock, and we are clear to
- * proceed to the backend. If we return APR_EEXISTS, then the lock is
+ * proceed to the backend. If we return APR_EEXIST, then the lock is
  * already locked, someone else has gone to refresh the backend data
  * already, so we must return stale data with a warning in the mean
  * time. If we return anything else, then something has gone pear
@@ -735,9 +735,9 @@ int cache_check_freshness(cache_handle_t
                 r->unparsed_uri);
         return 0;
     }
-    else if (APR_EEXIST == status) {
+    else if (APR_STATUS_IS_EEXIST(status)) {
         /* lock already exists, return stale data anyway, with a warning */
-        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00783)
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00783)
                 "Cache already locked for stale cached URL, "
                 "pretend it is fresh: %s",
                 r->unparsed_uri);



Re: svn commit: r1588704 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.c

Posted by Eric Covener <co...@gmail.com>.
On Sun, Apr 20, 2014 at 3:07 AM, Christophe JAILLET
<ch...@wanadoo.fr> wrote:
> Sorry for the noise.

Review appreciated nonetheless.

Re: svn commit: r1588704 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.c

Posted by Christophe JAILLET <ch...@wanadoo.fr>.
Le 20/04/2014 08:52, Marion & Christophe JAILLET a écrit :
> Hi,
>
> The description and the CHANGES are about AH00784 but the patch is 
> only about adding 'status' to AH00783.
>
> -    else if (APR_EEXIST == status) {
> +    else if (APR_STATUS_IS_EEXIST(status)) {
> seems not to change anything.
>
> #define     APR_STATUS_IS_EEXIST(s)   ((s) == APR_EEXIST)
>

Oops, just forget my comment.
I based it on on-line APR doc 
(http://apr.apache.org/docs/apr/1.5/group___a_p_r___s_t_a_t_u_s___i_s.html).
APR_STATUS_IS_EEXIST is more subtle than that.


Sorry for the noise.

CJ

Re: svn commit: r1588704 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.c

Posted by Marion & Christophe JAILLET <ch...@wanadoo.fr>.
Hi,

The description and the CHANGES are about AH00784 but the patch is only 
about adding 'status' to AH00783.

-    else if (APR_EEXIST == status) {
+    else if (APR_STATUS_IS_EEXIST(status)) {
seems not to change anything.

#define     APR_STATUS_IS_EEXIST(s)   ((s) == APR_EEXIST)


So, is something missing in the patch or the CHANGES entry should be 
tweaked?


CJ


Le 19/04/2014 22:21, covener@apache.org a écrit :
> Author: covener
> Date: Sat Apr 19 20:21:01 2014
> New Revision: 1588704
>
> URL: http://svn.apache.org/r1588704
> Log:
> Fix errors with CacheLock on Windows:
>
> cache_util.c(757): (OS 80)The file exists.  : [client 127.0.0.1:63889]
> AH00784: Attempt to obtain a cache lock for stale cached URL failed,
> revalidating entry anyway:
>
> Modified:
>      httpd/httpd/trunk/CHANGES
>      httpd/httpd/trunk/modules/cache/cache_util.c
>
> Modified: httpd/httpd/trunk/CHANGES
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1588704&r1=1588703&r2=1588704&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/CHANGES [utf-8] (original)
> +++ httpd/httpd/trunk/CHANGES [utf-8] Sat Apr 19 20:21:01 2014
> @@ -1,6 +1,9 @@
>                                                            -*- coding: utf-8 -*-
>   Changes with Apache 2.5.0
>   
> +  *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive
> +     is enabled.  [Eric Covener]
> +
>     *) mod_proxy: Preserve original request headers even if they differ
>        from the ones to be forwarded to the backend. PR 45387.
>        [Yann Ylavic]
>
> Modified: httpd/httpd/trunk/modules/cache/cache_util.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=1588704&r1=1588703&r2=1588704&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/cache/cache_util.c (original)
> +++ httpd/httpd/trunk/modules/cache/cache_util.c Sat Apr 19 20:21:01 2014
> @@ -240,7 +240,7 @@ CACHE_DECLARE(apr_int64_t) ap_cache_curr
>    * Try obtain a cache wide lock on the given cache key.
>    *
>    * If we return APR_SUCCESS, we obtained the lock, and we are clear to
> - * proceed to the backend. If we return APR_EEXISTS, then the lock is
> + * proceed to the backend. If we return APR_EEXIST, then the lock is
>    * already locked, someone else has gone to refresh the backend data
>    * already, so we must return stale data with a warning in the mean
>    * time. If we return anything else, then something has gone pear
> @@ -735,9 +735,9 @@ int cache_check_freshness(cache_handle_t
>                   r->unparsed_uri);
>           return 0;
>       }
> -    else if (APR_EEXIST == status) {
> +    else if (APR_STATUS_IS_EEXIST(status)) {
>           /* lock already exists, return stale data anyway, with a warning */
> -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00783)
> +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00783)
>                   "Cache already locked for stale cached URL, "
>                   "pretend it is fresh: %s",
>                   r->unparsed_uri);
>
>
>