From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id D6E217030E; Mon, 25 Jan 2021 01:26:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D6E217030E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611527195; bh=rbaV1T86fKXtVbfNiFrYi92O+w7t0YtR+QOY2A9IN/c=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=cQyfofvclZfPwh2G0/MVKlPCQGtdaD5W4KIu1RWnetOPUZ97h34AYDWB/LT8+wEjP lSX+Oo2n+MV3l4NrMlH+AxTDpFHAa9jnTmWYEU6VcAlH8qRP/EQgyKwK85mtfMO2M+ g70fJy1vJkfRE+dSLut+NBWg+6x95pRWvGbgfUjk= Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BEDCD7030E for ; Mon, 25 Jan 2021 01:26:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BEDCD7030E Received: by mail-lj1-f182.google.com with SMTP id f2so7831019ljp.11 for ; Sun, 24 Jan 2021 14:26:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qT3i5eL8Kb1E1jirZ5hrEjd2RXidxWDCLhVcMlEKV4w=; b=TZBVtxjIB/oFB391prMrxqn7pR0N5LIMp1hAq+CW9jmCodfRAg+8p5SDiDGqwd/6pL HCjuBR7VMWIccZ1XmmrQHVk3/fquz4P+3wJ0VXe/rayzBTkg55yaA4igmLvgKcCTrXTK q8feqLfg/UrKbLozbO2q23I2QmbZG2YkO52NvwhkovvJmSsz4GF5bbV8iZBPyhSo0C0o zN/mrwohg7LJwQFgl92NSLNe/Iakc9LPvKrQQvO0ayKqrmqqd1O9kBBWqwOk5FUoYITa lwp0wNTcwyWgLaJjaTu6+x0ayf//EUiUkIEzKHpHeMsTgkCd0y2RUw70wsRSFIHeaf7R KLJw== X-Gm-Message-State: AOAM533ONDKa6mMtKwmtDPUARthcer6UQwMgkfw/D2cwkwz61fPWJw08 4rJXZsUeMmRZq1tNWUErge+BwJaJdVA= X-Google-Smtp-Source: ABdhPJxOecAHRHZrxrvCCjhxBCQlzvmXgzNNUMNOhPOu2rEzH7a3Aca7XuYXZTwnLzIcZcGvgiOnNQ== X-Received: by 2002:a2e:a40a:: with SMTP id p10mr186490ljn.434.1611527193611; Sun, 24 Jan 2021 14:26:33 -0800 (PST) Received: from grain.localdomain ([5.18.91.94]) by smtp.gmail.com with ESMTPSA id b18sm808539lfj.140.2021.01.24.14.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 14:26:32 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id 2923A560099; Mon, 25 Jan 2021 01:26:31 +0300 (MSK) Date: Mon, 25 Jan 2021 01:26:31 +0300 To: Vladislav Shpilevoy Cc: tml Message-ID: <20210124222631.GC2174@grain> References: <20210118203556.281700-1-gorcunov@gmail.com> <20210118203556.281700-5-gorcunov@gmail.com> <20210119124649.GA2185@grain> <9a2214b5-02e4-0c7f-dba4-7afaf51082f1@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a2214b5-02e4-0c7f-dba4-7afaf51082f1@tarantool.org> User-Agent: Mutt/1.14.6 (2020-07-11) Subject: Re: [Tarantool-patches] [PATCH v12 4/8] module_cache: direct update a cache value on reload X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Sun, Jan 24, 2021 at 05:27:18PM +0100, Vladislav Shpilevoy wrote: > Thanks for the patch! > > On 19.01.2021 13:46, Cyrill Gorcunov wrote: > > On Mon, Jan 18, 2021 at 11:35:52PM +0300, Cyrill Gorcunov wrote: > >> Currently when we reload modules we remove old instance > >> from the module cache and then try to insert a new one > >> back. Note that module cache is a string based hash table: > >> we lookup for a pointer to the module via package name. > > > > This approach doesn't work. > > Why? False alarm, it does work. I fear due to shadow copy it won't be consistent but looking more precisely to mhash code I think it should be safe to update the pointer inplace without modifying the hash table. I still think our hashing code is just unreadable pile but whatever...