Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] db/gdbm rewrite
- X-seq: zsh-workers 40585
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] db/gdbm rewrite
- Date: Sun, 19 Feb 2017 10:19:17 -0800
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=a4UCwF9f74S7Wf8e7BfviC/si3vn0g9HIJ7IoYxphME=; b=fq1x0wj27dO//zrcE4RaB4Oj3jExeUAPa1lN0al5hVgsZAh6cZPL/6afME8MOEOnbg AFl7QbzYAiuec9pBuKZHoc2YoK02+2AhjEiwzlsxv/xrYNFn1rNpP6mK33O2rdOEyJfh DGkRDgZ1S7mp4uP07eWWqgbZFomE2QjCdNMx2c0RlCPjrQ/wvFt6SewuR6vcE2k25yMD Ot/0ze1g3idmELcQc6iZ77AsflIvEP03gLmfrDGX/04rAGFkJt4DivZqUxDJhN6Pbt16 zXZIw6a2lC+Cp5OBebY8lWIlf2ISybqf3Ss9y0xXYSKc0RrfHHwVTQ59gQYIbRRiqYHf lBgQ==
- In-reply-to: <1487494013.288657.885684608.5BB76024@webmail.messagingengine.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <170218164313.ZM10688@torch.brasslantern.com> <1487494013.288657.885684608.5BB76024@webmail.messagingengine.com>
On Feb 19, 12:46am, Sebastian Gniazdowski wrote:
}
} As the other thread pointed out, GDBM_SYNC flag means no change to
} database can be done, even when opening in read-only mode.
?? That's not what it means at all:
GDBM_READER reader
GDBM_WRITER writer
GDBM_WRCREAT writer - if database does not exist create new one
GDBM_NEWDB writer - create new database regardless if one exists
For the last three (writers of the database) the following may be
added added to read_write by bitwise or: GDBM_SYNC, which causes all
database operations to be synchronized to the disk, and GDBM_NOLOCK,
which prevents the library from performing any locking on the database
file.
GDBM_SYNC is meaningless for read-only mode; in any write mode it means
that changes made to by the program are immediately flushed out to the
file, so that other readers can immediately see the change. Locking is
a separate op. zsh/db/gdbm does use locking by default (does not pass
teh NOLOCK flag); I have never deeply investigated how gdbm handles that
underneath.
Man page also says:
It is important that every file opened is also closed. This is needed
to update the reader/writer count on the file.
Why would there be a reader/writer count if there is no concurrent change
allowed?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author