Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dba: lmdb: allow to override the MDB_NOSUBDIR flag #8856

Closed
@martinvonwittich

Description

@martinvonwittich

Description

Thelmdb driver of DBA always sets theMDB_NOSUBDIR flag and does not allow PHP code to override it:

intrc,flags=MDB_NOSUBDIR;

This is a problem for interoperability when sharing a single LMDB database between multiple programs written in different languages. LMDB itself defaults to using a subdirectory as a database, and will create two filesdata.mdb andlock.mdb in this directory. When using PHP, one has to opensubdir/data.mdb explicitly, but now the PHP code will usesubdir/data.mdb-lock instead ofsubdir/lock.mdb as a lock file, leading to two separate lock files when using different codebases:

host ~/test (master) # ls -l pkg.dbtotal 156K-rw------- 1 root root 148K Jun 22 16:49 data.mdb-rw------- 1 root root 8.0K Jun 23 19:30 lock.mdb-rw-r--r-- 1 root root 8.0K Jun 22 18:49 data.mdb-lock

Currently, the only way to work around this issue is by changing all other codebases to useMDB_NOSUBDIR too because there is no way to disable it in PHP.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp