[2.4.x] mod_dav_fs: add DAVLockDBType and add global mutex around lockdb use - #399
Open
notroj wants to merge 4 commits into
Open
[2.4.x] mod_dav_fs: add DAVLockDBType and add global mutex around lockdb use#399notroj wants to merge 4 commits into
notroj wants to merge 4 commits into
Conversation
notroj
force-pushed
the
24x-dav-fs-lockdb
branch
from
August 26, 2026 13:21
abf2002 to
1e2e2ec
Compare
APR_MAJOR_VERSION, APU_MAJOR_VERSION is not defined for APR trunk since the #include <apu_version.h> is conditional on APR < 2. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912571 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit fb0ac6a)
* modules/dav/fs/dbm.c (dav_dbm_open_direct): Take a dbmtype argument and use it to select the apr_dbm driver type. (dav_dbm_open): Continue to use the "default" propdb type to open the property databases. * modules/dav/fs/lock.c: Store and pass through the lockdb_type through. * modules/dav/fs/mod_dav_fs.c (dav_get_lockdb_path): Return the dbm type via an output argument. (dav_fs_cmd_davlockdbtype): New config directive. (dav_fs_merge_server_config): Merge the dbm type. (dav_fs_post_config): Set the default lockdb type. * modules/dav/fs/repos.h: Update prototypes as above; internal API only so no compat concerns. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1912718 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit afcdbee)
apr_dbm does not provide thread-safe locking: * modules/dav/fs/mod_dav_fs.c (dav_fs_get_server_conf): Replaces dav_get_lockdb_path. (dav_fs_pre_config, dav_fs_child_init): New hooks. (dav_fs_post_config): Create & store the mutex here. (register_hooks): Register new hooks. * modules/dav/fs/repos.h: Expose new dav_fs_server_conf struct. * modules/dav/fs/lock.c (dav_fs_lockdb_cleanup): New cleanup which unlocks and closes the dbm handle. (dav_fs_really_open_lockdb): Lock the mutex here, register a cleanup. (dav_fs_open_lockdb): Adjust to use dav_fs_get_server_conf. (dav_fs_close_lockdb): Run the cleanup here. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1914438 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 455147a)
2.4.x without ap_state_dir_relative.
notroj
force-pushed
the
24x-dav-fs-lockdb
branch
from
August 27, 2026 19:31
1e2e2ec to
0ce4650
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.