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 BF5FD6EC5F; Tue, 20 Apr 2021 12:29:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BF5FD6EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618910940; bh=cPQGgKk3gVRh9iTTrqX2lUQyyPxdc/29p8qxPHvnawM=; 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=wyDxlhejPXyviqUeQBIXp+y7MbmeP/ylVX1R07iLlMo5lDlmEcfBw152O8RwH7Neg 0ib91/r0Ehd/G5dJJPAiU0iKF9IybjnZ5hSCZH4X/Mb0/psiMKOjm9nqcn5s/+FoK+ 1qZcfr+84jdp00t8MBI5IflXazvZJ/eRHOSN2bZ4= Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (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 ACB3F6EC5F for ; Tue, 20 Apr 2021 12:28:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org ACB3F6EC5F Received: by smtp51.i.mail.ru with esmtpa (envelope-from ) id 1lYmgk-0003xv-VW; Tue, 20 Apr 2021 12:28:59 +0300 To: Vladislav Shpilevoy , avtikhon@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <20210419175357.13479-1-sergepetrenko@tarantool.org> <4e0dd508-1747-1264-95e2-2a32e4b2208c@tarantool.org> Message-ID: <9824d6f7-c057-17ac-3d2a-645b47d033e5@tarantool.org> Date: Tue, 20 Apr 2021 12:28:57 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <4e0dd508-1747-1264-95e2-2a32e4b2208c@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480B1C8842CE613979723F2FB4628545A35182A05F53808504004E1B789FD429DB4A2AA7E4BC411445351C35327CAB0B0826C161CB52B95C027 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7965AF5021CACFC74C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7C27E92EFAD44F80DEA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA6581F32D819F4BBEE18AEFFCB112464A5E8F6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249BAA8CD687FCDB2EBCC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C03257DF78C985F6198941B15DA834481F9449624AB7ADAF372E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3BE90F13D913F449135872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A52F8E4158EE10F90BEE5E2B49116CC01C517B6796BDC5AEF6D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D9DC20663B80603F419B6BCF576A255D0DF6B33E6530347B0DB82F2413C7531A9D63899847A510FB1D7E09C32AA3244CAAFE438B4C25B54F94B1E9075347741BE646F07CC2D4F3D8FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlPRl29Bx4WFR/Xi//WUNKQ== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446055385E44D8BC9CCD1AA1E8180CF16F73079BD7322CBCC00424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] feedback_daemon: fix indexing a nil value issue 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" 20.04.2021 01:39, Vladislav Shpilevoy пишет: > Thanks for the patch! > > For bugfixes we usually add a test. Looks fine except that. > But I didn't validate (because no a test). Thanks for the review! Here's  the test: =========================== diff --git a/test/box-tap/gh-5750-feedback-disabled-err.test.lua b/test/box-tap/gh-5750-feedback-disabled-err.test.lua new file mode 100755 index 000000000..190e93b7d --- /dev/null +++ b/test/box-tap/gh-5750-feedback-disabled-err.test.lua @@ -0,0 +1,29 @@ +#!/usr/bin/env tarantool + +-- +-- Test that disabling feedback in initial configuration doesn't lead to +-- "attempt to index field 'cached_events' (a nil value)" errors when creating +-- or dropping a space/index. +-- + +local tap = require('tap') +local test = tap.test('feedback_enabled=false') + +local ok, err = pcall(box.cfg, {feedback_enabled=false}) + +-- feedback daemon may be disabled at compile time. Then all options like +-- feedback_enabled will be undefined. +if not ok then +    test:plan(1) +    test:like(err, 'unexpected option', 'feedback_enabled is undefined') +    test:check() +    os.exit(0) +end + +test:plan(2) +ok = pcall(box.schema.space.create, 'test') +test:ok(ok, 'space create succeeds') +ok = pcall(box.space.test.drop, box.space.test) +test:ok(ok, 'space drop succeeds') +test:check() +os.exit(0) -- Serge Petrenko