From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6797 invoked by alias); 19 Feb 2017 09:01:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40582 Received: (qmail 3113 invoked from network); 19 Feb 2017 09:01:25 -0000 X-Qmail-Scanner-Diagnostics: from new1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.221):SA:0(-0.4/5.0):. Processed in 1.589432 secs); 19 Feb 2017 09:01:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint2@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.221 as permitted sender) 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=JSQBfLuOFZEcFyP/ZC00QXG1hm c=; b=hD/4TAkEzgFj2SY4WUSWyAFYxX8QwWCahyONA2ihhHstLMiFNrR+T5Et5L oRRsO41y95++b7T/zSRbaxwPc98Jat7fqM/YjEhDgnpjDIC4X+EgsL/xBby+Lh9u zeGzkwYny2FGYG/ZJkRECD5kIhybutaHS3BIWZMpzpAe8Gwsc= 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=JS QBfLuOFZEcFyP/ZC00QXG1hmc=; b=XB4iE3iP8zsy5NcjTEwaCCji0OQ3bOY/ix axtv65eQIj9ybAKdce1+Vi8Yh6RUAlLtKDUFFcu45xKc4Y6+ZPJ7zx0YcvIVKg02 coK7TRY3dSRfB+515D+rAhQLa4pQ3m0OPruB+qFUCrQm6i+al3T6v5+ChLb2F4iV /4e7fWDSE= X-ME-Sender: Message-Id: <1487494880.291196.885693096.6090E081@webmail.messagingengine.com> From: Sebastian Gniazdowski To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-715c2c0c Date: Sun, 19 Feb 2017 01:01:20 -0800 References: <170218164313.ZM10688@torch.brasslantern.com> <1487494013.288657.885684608.5BB76024@webmail.messagingengine.com> In-Reply-To: <1487494013.288657.885684608.5BB76024@webmail.messagingengine.com> Subject: Re: (Fwd) Re: [PATCH] db/gdbm rewrite On Sun, Feb 19, 2017, at 12:46 AM, Sebastian Gniazdowski wrote: > 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. PS. Doing "fetch" might seem not nice in "hash-as-database" frontend, but it would just clear PM_UPTODATE flag, rest is automatic. So maybe "zgdbmclear param key". In my gdbm update I allocate regular Params instead of heap-arena-ghosts, access database only when needed leveraging PM_UPTODATE and GDBM_SYNC, it might be even possible to open database without GDBM_SYNC and do locking with a "gdbmlock" builtin. -- Sebastian Gniazdowski psprint2@fastmail.com