From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BF3E8306C5 for ; Fri, 30 Nov 2018 04:00:16 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o9KI9E_PHydu for ; Fri, 30 Nov 2018 04:00:16 -0500 (EST) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 73523306B4 for ; Fri, 30 Nov 2018 04:00:16 -0500 (EST) Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1gSeek-0004uV-Jf for tarantool-patches@freelists.org; Fri, 30 Nov 2018 12:00:14 +0300 Date: Fri, 30 Nov 2018 12:00:14 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 8/9] wal: pass struct instead of vclock to checkpoint methods Message-ID: <20181130090014.GH5760@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org * Vladimir Davydov [18/11/28 19:16]: > Currently, we only need to pass a vclock between TX and WAL during > checkpointing. However, in order to implement auto-checkpointing > triggered when WAL size exceeds a certain threshold, we will need to > pass some extra info so that we can properly reset the counter > accounting the WAL size in the WAL thread. To make it possible,let's > move wal_checkpoint struct, which is used internally by WAL to pass a > checkpoint vclock, to the header and require the caller to pass it to > wal_begin/commit_checkpoint instead of just a vclock. wal is a singleton and there could be only one ongoing checkpoint. I am ok with this change but I don't understand the purpose of it: why not simply store wal_checkpoint in struct wal then you don't have to pass it around at all? -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov