From: Alexander Turenko <alexander.turenko@tarantool.org> To: Konstantin Osipov <kostja.osipov@gmail.com> Cc: tarantool-patches@freelists.org, Vladimir Davydov <vdavydov.dev@gmail.com> Subject: Re: [tarantool-patches] [PATCH v3 6/7] Add merger for tuples streams (C part) Date: Thu, 25 Apr 2019 16:32:27 +0300 [thread overview] Message-ID: <20190425133227.mvell3bwcbhzqkyb@tkn_work_nb> (raw) In-Reply-To: <20190425114343.GM29257@atlas> On Thu, Apr 25, 2019 at 02:43:43PM +0300, Konstantin Osipov wrote: > * Alexander Turenko <alexander.turenko@tarantool.org> [19/04/10 18:23]: > > +enum { MERGER_SOURCE_REF_MAX = INT_MAX }; > > It's merge_source, not merger, source, no? Here and in the rest of > the code. merge source or merger's source. I found it neat to have one prefix 'merger_' for all related structures and functions. But okay, I'll check it with Vladimir and if he agree will change those names. > > > +void > > +merger_context_delete(struct merger_context *ctx) > > Please decide it's either simply merger or merge_context. > merger_context does not make any sense to me. merger is a special kind of a source, the different thing. > > what's in the context anyway? Can you have multiple contexts in a > single merge? If no, why not simply merger? Why do you need both, > a merger and a context? > > > +/** > > + * Holds immutable parameters of a merger. > > + */ > > +struct merger_context { > > + struct key_def *key_def; > > + box_tuple_format_t *format; > > + /* Reference counter. */ > > + int refs; > > +}; > > Uhm.. Is it a comparison/sort context, not merger context then? key_def is here for comparisons, yep, but format is for creating tuples (with needed offsets). I'm like 'merger_' prefix, because it makes clear that it is something that a merger need to perform its work. The name is very common, yep. 'Comparison/sort context' would be more specific, but not exact: it would arise a question: 'why a format is a part of comparison context'? I'll discuss this point with Vladimir too. > Please explain why you need to ref it btw. I would simply pass it > into Lua via ffi, to avoid any references, and make it clear that > the life cycle of this object is bound to the merge window. So you'll need to construct a format in Lua somehow. Moreover, you'll need to create *right* format in Lua to make comparisons fast. Looks as a way more complex approach. Maybe I didn't get your idea.
next prev parent reply other threads:[~2019-04-25 13:32 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-10 15:21 [PATCH v3 0/7] Merger Alexander Turenko 2019-04-10 15:21 ` [PATCH v3 1/7] Add luaL_iscallable with support of cdata metatype Alexander Turenko 2019-04-18 17:30 ` [tarantool-patches] " Konstantin Osipov 2019-04-30 12:45 ` Vladimir Davydov 2019-04-10 15:21 ` [PATCH v3 2/7] Add functions to ease using Lua iterators from C Alexander Turenko 2019-04-18 17:31 ` [tarantool-patches] " Konstantin Osipov 2019-04-30 12:46 ` Vladimir Davydov 2019-04-10 15:21 ` [PATCH v3 3/7] lua: optimize creation of a tuple from a tuple Alexander Turenko 2019-04-18 17:32 ` [tarantool-patches] " Konstantin Osipov 2019-04-30 12:50 ` Vladimir Davydov 2019-04-30 15:07 ` Alexander Turenko 2019-04-10 15:21 ` [PATCH v3 4/7] lua: add non-recursive msgpack decoding functions Alexander Turenko 2019-04-18 17:35 ` [tarantool-patches] " Konstantin Osipov 2019-04-18 18:30 ` Alexander Turenko 2019-04-18 18:33 ` Konstantin Osipov 2019-04-18 18:44 ` Alexander Turenko 2019-04-30 13:03 ` Vladimir Davydov 2019-04-30 18:38 ` Alexander Turenko 2019-04-10 15:21 ` [PATCH v3 5/7] net.box: add skip_header option to use with buffer Alexander Turenko 2019-04-18 17:37 ` [tarantool-patches] " Konstantin Osipov 2019-04-18 18:39 ` Alexander Turenko 2019-04-30 13:16 ` Vladimir Davydov 2019-04-30 18:39 ` Alexander Turenko 2019-04-10 15:21 ` [PATCH v3 6/7] Add merger for tuples streams (C part) Alexander Turenko 2019-04-25 11:43 ` [tarantool-patches] " Konstantin Osipov 2019-04-25 13:32 ` Alexander Turenko [this message] 2019-04-25 13:45 ` Konstantin Osipov 2019-04-25 15:32 ` [tarantool-patches] " Alexander Turenko 2019-04-25 16:42 ` Konstantin Osipov 2019-04-30 15:34 ` Vladimir Davydov 2019-05-07 22:14 ` Alexander Turenko 2019-04-10 15:21 ` [PATCH v3 7/7] Add merger for tuple streams (Lua part) Alexander Turenko 2019-04-25 11:46 ` [tarantool-patches] " Konstantin Osipov 2019-04-25 12:53 ` Alexander Turenko 2019-04-25 13:30 ` Konstantin Osipov 2019-04-30 17:37 ` Vladimir Davydov 2019-04-30 21:09 ` [tarantool-patches] " Konstantin Osipov 2019-05-02 9:48 ` Vladimir Davydov 2019-05-07 22:14 ` 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=20190425133227.mvell3bwcbhzqkyb@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=kostja.osipov@gmail.com \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [tarantool-patches] [PATCH v3 6/7] Add merger for tuples streams (C part)' \ /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