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 5BBE02C6CF for ; Sat, 29 Sep 2018 01:06:50 -0400 (EDT) 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 fDN2KhWLlteD for ; Sat, 29 Sep 2018 01:06:50 -0400 (EDT) Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 15D2F2C6C5 for ; Sat, 29 Sep 2018 01:06:49 -0400 (EDT) Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1g67Sq-0007Mk-3E for tarantool-patches@freelists.org; Sat, 29 Sep 2018 08:06:48 +0300 Date: Sat, 29 Sep 2018 08:06:46 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 06/11] vinyl: enable quota upon recovery completion explicitly Message-ID: <20180929050646.GJ32712@chai> References: <804b312f11dfa0397f9a5314796ef7dc7781d3c5.1538155645.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <804b312f11dfa0397f9a5314796ef7dc7781d3c5.1538155645.git.vdavydov.dev@gmail.com> 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/09/28 21:00]: > Currently, we create a quota object with the limit maximized, and only > set the configured limit when local recovery is complete, so as to make > sure that no dump is triggered during recovery. As a result, we have to > store the configured limit in vy_env::memory, which looks ugly, because > this member is never used afterwards. Let's introduce a new method > vy_quota_enable to enable quota so that we can set the limit right on > quota object construction. This implies that we add a boolean flag to > vy_quota and only check the limit if it is set. > > There's another reason to add such a method. Soon we will implement > quota consumption rate limiting. Rate limiting requires a periodic timer > that would replenish quota. It only makes sense to start such a timer > upon recovery completion, which again leads us to an explicit method for > enabling quota. > > vy_env::memory will be removed by the following patch along with a few > other pointless members of vy_env. > ac OK to push. > Needed for #1862 -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov