[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-cvs
Subject:    svn commit: r1905229 - /httpd/httpd/trunk/modules/dav/main/mod_dav.c
From:       manu () apache ! org
Date:       2022-11-11 1:46:28
Message-ID: 20221111014628.F18E317A8F1 () svn01-us-east ! apache ! org
[Download RAW message or body]

Author: manu
Date: Fri Nov 11 01:46:28 2022
New Revision: 1905229

URL: http://svn.apache.org/viewvc?rev=1905229&view=rev
Log:
Open the lock database read-only when possible

The goal is to reduce lock contention, since a read access only
requires a shared lock. The improvement should not be significant 
since for now we open and close the lock database on each HTTP 
request. 


Modified:
    httpd/httpd/trunk/modules/dav/main/mod_dav.c

Modified: httpd/httpd/trunk/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.c?rev=1905229&r1=1905228&r2=1905229&view=diff
 ==============================================================================
--- httpd/httpd/trunk/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/trunk/modules/dav/main/mod_dav.c Fri Nov 11 01:46:28 2022
@@ -1458,8 +1458,7 @@ static dav_error *dav_gen_supported_live
     dav_error *err;
 
     /* open lock database, to report on supported lock properties */
-    /* ### should open read-only */
-    if ((err = dav_open_lockdb(r, 0, &lockdb)) != NULL) {
+    if ((err = dav_open_lockdb(r, 1, &lockdb)) != NULL) {
         return dav_push_error(r->pool, err->status, 0,
                               "The lock database could not be opened, "
                               "preventing the reporting of supported lock "
@@ -2242,8 +2241,7 @@ static int dav_method_propfind(request_r
     apr_pool_create(&ctx.scratchpool, r->pool);
     apr_pool_tag(ctx.scratchpool, "mod_dav-scratch");
 
-    /* ### should open read-only */
-    if ((err = dav_open_lockdb(r, 0, &ctx.w.lockdb)) != NULL) {
+    if ((err = dav_open_lockdb(r, 1, &ctx.w.lockdb)) != NULL) {
         err = dav_push_error(r->pool, err->status, 0,
                              "The lock database could not be opened, "
                              "preventing access to the various lock "


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic