Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH 3/8] Add 'exact_field_count' parameter to options decoder
Date: Mon, 13 Aug 2018 11:30:28 +0300	[thread overview]
Message-ID: <20180813083028.xrcdo3d3e7pkcjam@esperanza> (raw)
In-Reply-To: <eb2fd1e6f6c7bc44310014ce6277bb926e7e0fe2.1533679264.git.v.shpilevoy@tarantool.org>

On Wed, Aug 08, 2018 at 01:03:46AM +0300, Vladislav Shpilevoy wrote:
> Needed for promotion. Promotion uses system space
> _promotion, into which a user can write tuples directly
> with not API usage (and we can not do anything with it),
> so _promotion should do severe validation of each field
> of each tuple since it affects the cluster state.
> 
> For this a new parameter of options decoder is introduced,
> that checks for exact field count.

TBH I don't think it's really necessary, because if the user writes to
this table, promotion logic may break anyways AFAIU. So why don't you
just use default parameters if some fields are omitted?

Anyway, passing exact_field_count to a function decoding options from a
map looks kinda weird. And if you decide to extend the options one day,
it will become useless, because you'll have to handle options generated
by older versions which don't have some parameters.

  reply	other threads:[~2018-08-13  8:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 22:03 [PATCH 0/8] box.ctl.promote Vladislav Shpilevoy
2018-08-07 22:03 ` [PATCH 1/8] rfc: describe box.ctl.promote protocol Vladislav Shpilevoy
2018-08-07 22:03 ` [PATCH 2/8] box: rename process_rw to process_dml Vladislav Shpilevoy
2018-08-13  8:20   ` Vladimir Davydov
2018-08-07 22:03 ` [PATCH 3/8] Add 'exact_field_count' parameter to options decoder Vladislav Shpilevoy
2018-08-13  8:30   ` Vladimir Davydov [this message]
2018-08-07 22:03 ` [PATCH 4/8] box: remove orphan check from box_is_ro() Vladislav Shpilevoy
2018-08-13  8:34   ` Vladimir Davydov
2018-08-07 22:03 ` [PATCH 5/8] Fix gcov on Mac Vladislav Shpilevoy
2018-08-07 22:03 ` [PATCH 6/8] box: introduce _promotion space Vladislav Shpilevoy
2018-08-07 22:03 ` [PATCH 7/8] box: introduce box.ctl.promote Vladislav Shpilevoy
2018-08-13  8:58   ` Vladimir Davydov
2018-08-07 22:03 ` [PATCH 8/8] box: introduce promotion GC Vladislav Shpilevoy

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=20180813083028.xrcdo3d3e7pkcjam@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [PATCH 3/8] Add '\''exact_field_count'\'' parameter to options decoder' \
    /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