Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedback: Binary protocol | Tarantool #1662

Closed
Tracked by #2646
TarantoolBot opened this issue Nov 27, 2020 · 2 comments
Closed
Tracked by #2646

feedback: Binary protocol | Tarantool #1662

TarantoolBot opened this issue Nov 27, 2020 · 2 comments
Labels
factual error Factual error in functionality description iproto Related to the iproto protocol

Comments

@TarantoolBot
Copy link
Collaborator

<…> | | |
| |0x00: IPROTO_REQUEST_TYPE| | 0x01: IPROTO_SYNC | 0x05: IPROTO_SCHEMA_VERSION |
<…>

https://www.tarantool.io/en/doc/2.3/dev_guide/internals/box_protocol/#box-protocol-join

Тут и везде в текстовых схемах одна и та же ошибка.
Вместо "0x00: IPROTO_REQUEST_TYPE" дожно быть "0x00: REQUEST_TYPE" (как было в доке 2.2)
Дело в том, что IPROTO_REQUEST_TYPE == 0x00, и вместо пары Ключ : Значение в доке написано Ключ : Ключ.
Однако (как и написано ниже) IPROTO_REQUEST_TYPE == 0x00.
В строке же 0x00: IPROTO_REQUEST_TYPE
Так вот 0x00: IPROTO_REQUEST_TYPE - это, получается Ключ : Ключ.

@pgulutzan
Copy link
Contributor

We explain near the start: "And words that start with IPROTO_ mean: a Tarantool constant which is either defined or mentioned in the iproto_constants.h file <https://github.com/tarantool/tarantool/blob/master/src/box/iproto_constants.h>_."
The Tarantool source uses it, for example in xrow.c one can see "d = mp_encode_uint(d, IPROTO_REQUEST_TYPE);" in the function for encoding the header.

@alyapunov
Copy link

In iproto header the constant IPROTO_REQUEST_TYPE must be followed by a value of request type, for example IPROTO_SELECT or IPROTO_REPLACE. But now in the manual we see that a constant 0x00 if followed by constant IPROTO_REQUEST_TYPE, which is zero as iproto_constants.h states. That's misleading.
Some time ago we had:

|  0x00   | REQUEST_TYPE |
| MP_UINT |   MP_UINT    |

What was meant (sorry if it's confusing either):

|  0x00   | <request type> |
| MP_UINT |    MP_UINT     |

But now we have:

|  0x00   | IPROTO_REQUEST_TYPE |
| MP_UINT |       MP_UINT       |

This is wrong.

@patiencedaur patiencedaur added this to the iproto milestone Jan 19, 2022
@patiencedaur patiencedaur removed this from the iproto milestone Feb 1, 2022
@patiencedaur patiencedaur added factual error Factual error in functionality description iproto Related to the iproto protocol labels Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
factual error Factual error in functionality description iproto Related to the iproto protocol
Projects
None yet
Development

No branches or pull requests

4 participants