Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
	Konstantin Osipov <kostja@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 7/8] netbox: remove schema_version from requests
Date: Tue, 8 May 2018 20:24:31 +0300	[thread overview]
Message-ID: <e07abfec-5a55-1c5d-1d7d-f0c4fdc70ad0@tarantool.org> (raw)
In-Reply-To: <20180508160629.GB20248@atlas>



On 08/05/2018 19:06, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [18/04/16 21:44]:
> 
>> Schema_version was used in netbox to update local box-like
>> schema. The box-like schema makes able to access spaces and
>> indexes via connection object.
>>
>> It was updated each time, when a response from a server is
>> received with a schema version non-equal to the local value.
>>
>> But there was no reason why a schema version is needed in a
>> request. It leads to ER_WRONG_SCHEMA_VERSION error sometimes,
>> but netbox on this error just resends the same request again. The
>> same behaviour can be reached with just no sending any schema
>> version to a server.
> 
> As far as I can see you removed all checks for schema_version and
> never re-fetch the schema after a connection is established,
> despite what you write in the comment.
> 
> Please explain how you ever check that schema has changed when
> performing a request.

As I already explained you in Telegram, this check, even before
my commit, was done inside netbox state machine.

Look at the iproto_sm - this function on each response decodes the former
and checks schema version. You may think it is called only once from
iproto_schema_sm, that is called from iproto_auth_sm, but it is wrong.

Iproto_sm is just one state of the state machine. The machine can returns
into it again and again like this:

protocol_sm -> iproto_auth_sm -> iproto_schema_sm -> iproto_sm
-> iproto_sm ->
-> iproto_sm ->
...
-> iproto_sm ->
-> iproto_schema_sm ->
-> iproto_sm ->
...

These steps are executed inside the worker fiber.

  reply	other threads:[~2018-05-08 17:24 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 18:39 [PATCH 0/8] netbox: introduce fiber-async API Vladislav Shpilevoy
2018-04-16 18:39 ` [PATCH 1/8] lua: fix box.error.raise Vladislav Shpilevoy
2018-04-23 16:19   ` Vladimir Davydov
2018-05-08 15:36   ` [tarantool-patches] " Konstantin Osipov
2018-05-08 17:24     ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-16 18:39 ` [PATCH 2/8] lua: allow to create and error object with no throw Vladislav Shpilevoy
2018-04-23 16:20   ` Vladimir Davydov
2018-05-08 15:37   ` [tarantool-patches] " Konstantin Osipov
2018-04-16 18:39 ` [PATCH 3/8] console: fix a bug in interactive readline usage Vladislav Shpilevoy
2018-04-23 16:20   ` Vladimir Davydov
2018-05-08 15:37   ` [tarantool-patches] " Konstantin Osipov
2018-04-16 18:39 ` [PATCH 4/8] netbox: extend codec with 'decode' methods Vladislav Shpilevoy
2018-04-23 16:42   ` Vladimir Davydov
2018-04-23 18:59     ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-24 13:16       ` Vladimir Davydov
2018-05-08 15:49   ` [tarantool-patches] " Konstantin Osipov
2018-05-08 17:24     ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-16 18:39 ` [PATCH 5/8] test: fix unstable test Vladislav Shpilevoy
2018-04-22  5:32   ` [tarantool-patches] " Kirill Yukhin
2018-05-08 15:50   ` Konstantin Osipov
2018-04-16 18:39 ` [PATCH 6/8] netbox: introduce fiber-async API Vladislav Shpilevoy
2018-04-23 12:31   ` [tarantool-patches] " Alexander Turenko
2018-04-23 18:59     ` Vladislav Shpilevoy
2018-04-23 16:44   ` Vladimir Davydov
2018-04-23 18:59     ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-24 13:05       ` Vladimir Davydov
2018-04-16 18:39 ` [PATCH 7/8] netbox: remove schema_version from requests Vladislav Shpilevoy
2018-05-08 16:06   ` [tarantool-patches] " Konstantin Osipov
2018-05-08 17:24     ` Vladislav Shpilevoy [this message]
2018-04-16 18:39 ` [PATCH 8/8] netbox: implement perform_request via async version Vladislav Shpilevoy
2018-04-23 16:47   ` Vladimir Davydov
2018-04-23 19:00     ` [tarantool-patches] " 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=e07abfec-5a55-1c5d-1d7d-f0c4fdc70ad0@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 7/8] netbox: remove schema_version from requests' \
    /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