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 C530670202; Wed, 24 Feb 2021 22:40:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C530670202 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614195605; bh=nHbc1JDz96mB7utzMBi5QSHJYMT8QT6rKTRXu3bWaLs=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=IYgwM8fiknCZoEwQxPf+pxkc48+YAZ7fOqGoQZHlLhBXQHRBVglw/lrjYy7BOHiDC YR1Qdy/P42XtjXsIud7lnGysusBMecwNQGHQ7cyME5+kIysT1hjMo3/b1eQKgIsBak s+p1UdGHOpNSQkE7Ep7hAp+8E9ZYFJJDb4e+4hz4= Received: from smtp3.mail.ru (smtp3.mail.ru [94.100.179.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1E1F570202 for ; Wed, 24 Feb 2021 22:40:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1E1F570202 Received: by smtp3.mail.ru with esmtpa (envelope-from ) id 1lF00x-0008VX-Ck; Wed, 24 Feb 2021 22:40:03 +0300 To: gorcunov@gmail.com, v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <20210224193549.70017-1-sergepetrenko@tarantool.org> Message-ID: <7998ba31-6d4a-0cf7-8f97-5b7a224000d6@tarantool.org> Date: Wed, 24 Feb 2021 22:40:02 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210224193549.70017-1-sergepetrenko@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD975C3EC174F5669229511437AA01F46811CFCF616A939B362182A05F538085040AB4DF7C6A37A71666CA87E243E43D95EFB968636555AA1C69ABB768B1200B092 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72777B9F191503624EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373C9FC9F3BACECB908638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CDDE882590F889B1CDD9A2BB52DE531FE11882AA1549BF872A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C390D92131081DE748117882F4460429728AD0CFFFB425014E868A13BD56FB6657A7F4EDE966BC389F9E8FC8737B5C2249D479A90A4652661D089D37D7C0E48F6CCF19DD082D7633A0E7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7C6B0B6A749F1976AFC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5ED42AE37EAF8BDF5A9E358C497051F3E066D2718AD7B8B15D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7557E988E9157162368E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C02783DDD5A45DEF98AE4F5C525F9B02F70808D13B39FC08D4396656F291F7BA962C3CFE2C636E5F1D7E09C32AA3244C75224EA71821156D2B9E647002F0E5EE259227199D06760AFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyK6JYJ15DtJJFiw7V+gATA== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446073080CD277EC7CA28ED4A05690EB6F3C531F17844DA7034424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v3] wal: introduce limits on simultaneous writes 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 24.02.2021 22:35, Serge Petrenko пишет: > diff --git a/src/box/wal.c b/src/box/wal.c > index 937d47ba9..4a0381cf4 100644 > --- a/src/box/wal.c > +++ b/src/box/wal.c > @@ -765,6 +765,20 @@ wal_set_checkpoint_threshold(int64_t threshold) > fiber_set_cancellable(cancellable); > } > > +void > +wal_set_queue_max_size(int64_t size) > +{ > + assert(&wal_writer_singleton.base == current_journal); > + journal_queue_set_max_size(size); > +} > + > +void > +wal_set_queue_max_len(int64_t len) > +{ > + assert(&wal_writer_singleton.base == current_journal); > + journal_queue_set_max_len(len); > +} > + A small fix: these asserts aren't needed anymore. So, diff --git a/src/box/wal.c b/src/box/wal.c index 4a0381cf4..328ab092d 100644 --- a/src/box/wal.c +++ b/src/box/wal.c @@ -768,14 +768,12 @@ wal_set_checkpoint_threshold(int64_t threshold)  void  wal_set_queue_max_size(int64_t size)  { -       assert(&wal_writer_singleton.base == current_journal);         journal_queue_set_max_size(size);  }  void  wal_set_queue_max_len(int64_t len)  { -       assert(&wal_writer_singleton.base == current_journal);         journal_queue_set_max_len(len);  } -- Serge Petrenko