Subject Re: [firebird-support] Service restore from stdin
Author Dimitry Sibiryakov
04.10.2017 11:42, Pavel Cisar pcisar@... [firebird-support] wrote:
> Until stdin is fully transmited service may need another
> chunk, but reply to application is blocked until stdout buffer (eof
> request) is full, so everything gets stuck (service will not ask for
> further input because there is not enough output to send the request).

Actually I see the contrary: output buffer is empty, but no request for input is sent.
Output from my test program which send { isc_info_svc_stdin, isc_info_svc_line } looks
like that:

> query piece 0
> isc_info_svc_stdin 262144
> isc_info_svc_line 0:
> isc_info_data_not_ready
> query piece 512
> isc_info_svc_stdin 262144
> isc_info_svc_line 0:
> isc_info_data_not_ready

Notice that it always gets isc_info_data_not_ready.
But if I change request to {isc_info_svc_stdin } (because I know that no data is ever
returned), I get this:

> query piece 0
> isc_info_svc_stdin 0
> isc_info_end
........ about 40 times the same ..........
> query piece 0
> isc_info_svc_stdin 0
> isc_info_end
> query piece 0
> isc_info_svc_stdin 262144
> isc_info_end
> query piece 512
> isc_info_svc_stdin 262144
> isc_info_end

I.e. server just wasting network throughput requesting no data from client as if
request timeout is by default set to zero instead of infinity.
Is it intended behavior?

Besides, my whole test backup size is 512 bytes, but server asks for more data even
when got it all.
What else must I send to it?
Now I forcefully disconnect after sending of whole backup and it seems to work. But is
it right way?

--
WBR, SD.