[tarantool-patches] Re: Fwd: [PATCH 1/1] rfc: describe a Tarantool wire protocol

Konstantin Osipov kostja at tarantool.org
Thu Apr 5 13:03:27 MSK 2018


* Алексей Гаджиев <alexey.gadzhiev at corp.mail.ru> [18/04/05 12:05]:
> Looks cool! Now we can send chunked data!
> 
> I have one question:
> Is IPROTO_OK mandatory packet in the response messages sequence?
> How can I detect if next push/result_set available if previous consists only of one chunk without   SQL_INFO_HAS_NEXT_CHUNK?
> 

Generally, you can't. The server doesn't know it yet itself. For
example, imagine this:

while (condition)
    box.session.push()
end
return;

In this case there can be variable number of pushes. 

But you know for sure there will be next packet before the
sequence of packets for this request ends - either CHUNK or OK.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov




More information about the Tarantool-patches mailing list