From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Alex Khatskevich <avkhatskevich@tarantool.org>, tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH 3/3] Introduce destroy module feature Date: Tue, 26 Jun 2018 14:11:51 +0300 [thread overview] Message-ID: <4769d4ef-ab88-561a-72b0-3722180e13ef@tarantool.org> (raw) In-Reply-To: <1ebeee48-5204-f1c4-0775-bc12276bfcdf@tarantool.org> Thanks for the fixes! See 3 comments below. On 26/06/2018 00:54, Alex Khatskevich wrote: > >>> --- a/test/lua_libs/util.lua >>> +++ b/test/lua_libs/util.lua >>> @@ -69,9 +69,43 @@ local function wait_master(test_run, replicaset, master) >>> log.info('Slaves are connected to a master "%s"', master) >>> end >>> +function vshard_fiber_list() >>> + -- Flush jit traces to prevent them from >>> + -- keeping its upvalues in memory. >>> + jit.flush() >>> + collectgarbage() >>> + -- Give a fiber time to clean itself. >>> + fiber.sleep(0.05) >> >> 1. Why do you need this sleep? As far as I know >> collectgarbage just cleans all the garbage in the same >> fiber with no yields or async tasks. > netbox: If `collect garbage` has collected a connection, the fiber need a time to wakeup after > fiber:cancel() to process it and exit. > another module: the same possible behavior. 1. I removed this sleep and nothing happened. See below comment 5. > commit b0cddc2a3ba30d3ecf57e71ce8d095bf2f093a5e > Author: AKhatskevich <avkhatskevich@tarantool.org> > Date: Wed Jun 20 00:31:25 2018 +0300 > > Introduce destroy module feature > > Introduce functions: > * vshard.router.destroy() > * vshard.storage.destroy() > > Those functions: > * close connections > * stop background fibers > * delete vshard spaces > * delete vshard funcitons 2. Typo. > * delete `once` metadate 3. Typo. > > After the destroy, module can be configured as it was just loaded. > > Extra changes: > * introduce fiber_list function which returns names of non-tarantool > fibers > * introduce update_M function, which updates M (module internals) with > values defined in the module > > Closes #121 > > diff --git a/test/lua_libs/util.lua b/test/lua_libs/util.lua > index f2d3b48..ce0ea67 100644 > --- a/test/lua_libs/util.lua > +++ b/test/lua_libs/util.lua > @@ -69,9 +69,43 @@ local function wait_master(test_run, replicaset, master) > log.info('Slaves are connected to a master "%s"', master) > end > > +function vshard_fiber_list() > + -- Flush jit traces to prevent them from > + -- keeping its upvalues in memory. > + jit.flush() > + collectgarbage() > + -- Give a fiber time to clean itself. > + fiber.sleep(0.05) 4. It makes no sense not only because it changes nothing in the test output. Even if it could affect active fiber count because of fibers that had not managed to exit, you call this vshard_fiber_list() in the while cycles until its output matches your expectations. So please, remove the sleep. 5. Since we do not know what to do with spaces cleaning, I will review the next part of the patch later, when we will know.
prev parent reply other threads:[~2018-06-26 11:11 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-22 21:43 [tarantool-patches] [PATCH 0/3][vshard] Small patches AKhatskevich 2018-06-22 21:43 ` [tarantool-patches] [PATCH 1/3] Do not force login/pass in URI AKhatskevich 2018-06-22 22:11 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-25 21:56 ` Alex Khatskevich 2018-06-26 11:11 ` Vladislav Shpilevoy 2018-06-22 21:43 ` [tarantool-patches] [PATCH 2/3] Allow use existing user AKhatskevich 2018-06-22 22:12 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-25 21:55 ` Alex Khatskevich 2018-06-26 11:11 ` Vladislav Shpilevoy 2018-06-22 21:43 ` [tarantool-patches] [PATCH 3/3] Introduce destroy module feature AKhatskevich 2018-06-22 22:11 ` [tarantool-patches] " Vladislav Shpilevoy 2018-06-25 21:54 ` Alex Khatskevich 2018-06-26 11:11 ` Vladislav Shpilevoy [this message]
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=4769d4ef-ab88-561a-72b0-3722180e13ef@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=avkhatskevich@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH 3/3] Introduce destroy module feature' \ /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