summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanu <manu@unknown>2022-11-11 02:46:28 +0100
committermanu <manu@unknown>2022-11-11 02:46:28 +0100
commit00e2081670e6abe5488f23b3f71fc0ad67189519 (patch)
tree50ac247dba0f822fd4b313c17b7a7defd5e5a5da
parentadd an example where the filename doesnt change (diff)
downloadapache2-00e2081670e6abe5488f23b3f71fc0ad67189519.tar.xz
apache2-00e2081670e6abe5488f23b3f71fc0ad67189519.zip
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905229 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/dav/main/mod_dav.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c
index 2676b835ee..ea87317c3f 100644
--- a/modules/dav/main/mod_dav.c
+++ b/modules/dav/main/mod_dav.c
@@ -1458,8 +1458,7 @@ static dav_error *dav_gen_supported_live_props(request_rec *r,
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_rec *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 "