From: Sebastian Gniazdowski <psprint2@fastmail.com>
To: zsh-workers@zsh.org
Subject: Re: (Fwd) Re: [PATCH] db/gdbm rewrite
Date: Sun, 19 Feb 2017 00:46:53 -0800 [thread overview]
Message-ID: <1487494013.288657.885684608.5BB76024@webmail.messagingengine.com> (raw)
In-Reply-To: <170218164313.ZM10688@torch.brasslantern.com>
On Sat, Feb 18, 2017, at 04:43 PM, Bart Schaefer wrote:
> On Feb 14, 4:20am, Sebastian Gniazdowski wrote:
> }
> } -- hashtable is filled normally, initially with ~PM_UPTODATE
> } -- Param "dereference" detects ~PM_UPTODATE, uses database, sets u.str,
> } sets PM_UPTODATE
>
> This is not going to provide equivlent behavior, is it? If the database
> is being read by zsh and updated by some other process, how does zsh know
> that it needs to re-fetch what has now become a cached value?
As the other thread pointed out, GDBM_SYNC flag means no change to
database can be done, even when opening in read-only mode. This is
certain, and allows PM_UPTODATE to be used. The possible concurrent
change in Zsh forked process is a hole. It can be turned into an
feature, though. A new builtin "zgdbmfetch paramname key" could be
provided to re-fetch element when someone is going to try to do
concurrent access with inherited FD and GDBM_SYNC lock, say with use of
zsystem flock on other FD.
--
Sebastian Gniazdowski
psprint2@fastmail.com
next prev parent reply other threads:[~2017-02-19 8:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-19 0:43 Bart Schaefer
2017-02-19 8:46 ` Sebastian Gniazdowski [this message]
2017-02-19 9:01 ` Sebastian Gniazdowski
2017-02-19 18:19 ` Bart Schaefer
2017-02-20 8:32 ` Sebastian Gniazdowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487494013.288657.885684608.5BB76024@webmail.messagingengine.com \
--to=psprint2@fastmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).