Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: (Fwd) Re: [PATCH] db/gdbm rewrite
- X-seq: zsh-workers 40581
- From: Sebastian Gniazdowski <psprint2@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: (Fwd) Re: [PATCH] db/gdbm rewrite
- Date: Sun, 19 Feb 2017 00:46:53 -0800
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=NkkYhnHYJvADagq3yVI3lGMqkX E=; b=esZrwRf6SCVqLMFwSGEi1M0NE6P7esWQW89O2b06yXAxVt6H3pfnJ6hag1 A9MQ+8PP19q1DLmx+Q7UQYr8HSuK2swbBnfpJYTzTJHiOJiaDEY4glDy3/rXFc5g tKhAPJeicpFMQtBgvV3VpVNJuCEetTSY/Al2GI46mnfOuF3RY=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=Nk kYhnHYJvADagq3yVI3lGMqkXE=; b=VhAe1tx6T0yuJu/dqqpfq7vg0FO3SYN8fG 3Bm0yIHP/FHM+QvwNfqllfQTHJip2ydcIbCFmiHl45hyTNaXS7wsbsfdG/SwUXo8 Lrl01tWmOJ6hiL5suPJsfelpy4noB2NQnB+NTpNssjpVSStpoQF9QSTiCKI0faNX oo5TDwTGY=
- In-reply-to: <170218164313.ZM10688@torch.brasslantern.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>
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@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author