From: Igor Munkin <imun@tarantool.org> To: Alexander Turenko <alexander.turenko@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 3/3] box: always reconfigure box at non-first box.cfg() Date: Thu, 4 Jun 2020 01:41:55 +0300 [thread overview] Message-ID: <20200603224155.GG5745@tarantool.org> (raw) In-Reply-To: <59dfb8a35bff974f53943342fb08b1a32c71d0bd.1589321083.git.alexander.turenko@tarantool.org> Sasha, Thanks for the patch, LGTM, except two typos below. On 13.05.20, Alexander Turenko wrote: > From: Maria <maria.khaydich@tarantool.org> > > Calling box.cfg{} more than once does not normally cause any errors > (even though it might not have any effect). In contrast, assigning > it to some variable and then using it after the box was configured > caused an error since the method was overwritten by the initial call > of <load_cfg>. > > The patch fixes this issue making box.cfg behave consistently in both > scenarios. > > Follow-up #4231 > > Co-developed-by: Alexander Turenko <alexander.turenko@tarantool.org> > --- > src/box/lua/load_cfg.lua | 8 +++++ > .../gh-4231-box-cfg-idempotence.test.lua | 34 +++++++++++++++++++ > 2 files changed, 42 insertions(+) > create mode 100755 test/box-tap/gh-4231-box-cfg-idempotence.test.lua > <snipped> > diff --git a/test/box-tap/gh-4231-box-cfg-idempotence.test.lua b/test/box-tap/gh-4231-box-cfg-idempotence.test.lua > new file mode 100755 > index 000000000..4f3ba68a6 > --- /dev/null > +++ b/test/box-tap/gh-4231-box-cfg-idempotence.test.lua > @@ -0,0 +1,34 @@ > +#!/usr/bin/env tarantool > + > +-- > +-- gh-4231: box.cfg is another function (so called <load_cfg>) > +-- before box is loaded. Usually a user calls box.cfg({<...>}), > +-- it configures box and replaces box.cfg implementation to one > +-- that performs box reconfiguration: so further calls to > +-- box.cfg({<...>}) reconfigures box. Typo: s/reconfigures/reconfigure/. > +-- > +-- However it is possible to save box.cfg value (<load_cfg>) > +-- before box loading and call it after box loading: the behaviour > +-- should be the same as for box.cfg call: box should be Typo: There are two colons in one sentence, so I propose simply to s/:/and/ the last one. > +-- reconfigured. > +-- > + <snipped> > -- > 2.25.0 > -- Best regards, IM
next prev parent reply other threads:[~2020-06-03 22:51 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-12 22:18 [Tarantool-patches] [PATCH 0/3] box.execute() and box.cfg() idempotence and locking Alexander Turenko 2020-05-12 22:18 ` [Tarantool-patches] [PATCH 1/3] box: check whether box is loaded in box.execute() Alexander Turenko 2020-05-22 7:31 ` lvasiliev 2020-06-03 21:58 ` Igor Munkin 2020-06-08 18:58 ` Alexander Turenko 2020-06-11 17:43 ` Igor Munkin 2020-05-12 22:18 ` [Tarantool-patches] [PATCH 2/3] box: always wait box loading " Alexander Turenko 2020-05-22 11:08 ` lvasiliev 2020-06-03 23:12 ` Igor Munkin 2020-05-12 22:18 ` [Tarantool-patches] [PATCH 3/3] box: always reconfigure box at non-first box.cfg() Alexander Turenko 2020-05-22 7:02 ` lvasiliev 2020-06-03 22:41 ` Igor Munkin [this message] 2020-06-03 23:22 ` Igor Munkin 2020-06-08 18:59 ` Alexander Turenko 2020-06-17 22:26 ` Vladislav Shpilevoy 2020-06-18 8:41 ` Alexander Turenko 2020-06-18 22:23 ` Vladislav Shpilevoy 2020-05-22 7:06 ` [Tarantool-patches] [PATCH 0/3] box.execute() and box.cfg() idempotence and locking lvasiliev 2020-06-08 18:59 ` Alexander Turenko 2020-06-17 22:30 ` Vladislav Shpilevoy 2020-06-22 10:11 ` Kirill Yukhin 2020-06-23 23:55 ` Alexander Turenko
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200603224155.GG5745@tarantool.org \ --to=imun@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 3/3] box: always reconfigure box at non-first box.cfg()' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox