Re: [PATCH v5 25/27] refs: add LMDB refs storage backend
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 20, 2016, 13:14 UTC
- Message-ID
- <CACsJy8Ci_U+=Nw+9mzebQ1w3xtvb_=TZKyKC4nkRMPjhwDQ-mg@mail.gmail.com>
- In-Reply-To
- <1455827001.7528.87.camel@twopensource.com>
On Fri, Feb 19, 2016 at 3:23 AM, David Turner <dturner@twopensource.com> wrote:
Show 14 quoted lines
> On Thu, 2016-02-18 at 15:50 +0700, Duy Nguyen wrote: > > [snip] > > Thanks; applied the above > >> This permission makes me wonder if we need adjust_shared_perm() here >> and some other places. > > So just add this after every mkdir? > > if (shared_repository) > adjust_shared_perm(db_path); >
Another option is avoid mkdir entirely. Getting started page [1] says if you do mdb_open_env(.., "refs.lmdb", MDB_NOSUBDIR,..) then it will create two files refs.lmdb and refs.lmdb.lock. No need for the directory "refs.lmdb" just to contain two files.
[1] http://symas.com/mdb/doc/starting.html
-- Duy