Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merger: use the
skip_header
option of the net.box
connection's API
In scope of tarantool/tarantool#8147, a new context-dependent extension for box tuples, `MP_TUPLE`, is introduced, and the IPROTO data response is extended with a new `IPROTO_TUPLE_FORMATS` field with tuples formats necessary for decoding `MP_TUPLE` sent in the `IPROTO_DATA` field. If the tuple merger's buffer source is used, raw MsgPack is received (see also d18ad41). We expect the response to only contain an `IPROTO_DATA` field, so the occurrence of a new `IPROTO_TUPLE_FORMATS` field breaks this assumption. The `IPROTO_DATA` field is still decoded correctly, but the input buffer's position now points to the `IPROTO_TUPLE_FORMATS` field instead of the end of the response. Instead of handling the issue described above we decided to opt for a simpler solution, namely, using the `skip_header` option of the `net.box` connection's API, which returns only the `IPROTO_DATA` field's value, which is what we are looking for. This option is was introduced in tarantool/tarantool@1aaf637870 (2.2.0 release), but since the issue described above can only occur with the latest Tarantool version, we can safely fallback to manually decoding the `IPROTO_DATA` header on old Tarantool versions. Needed for tarantool/tarantool#8147
- Loading branch information