[Tarantool-patches] [PATCH 1/5] popen: Introduce a backend engine

Konstantin Osipov kostja.osipov at gmail.com
Fri Nov 29 14:19:03 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [19/11/29 14:06]:
> > Shouldn't you be using a non-blocking I/O like coio does?
> 
> Actually I fear I don't understand this moment -- I wrapped
> the popen_write into coio_custom calls, this is what you
> mean, or womething else?

Yes, I meant it.
there is no need to call a thread to write to a file descriptor.

> But I think you noticed already that our fio.write() is simply
> broken by design -- we do return true/false but instead we should
> return bytes written to the caller. It is always up to the caller
> what to do with partial writes because only the caller knowns the
> context of the call. Can he proceed with partial writes, or he
> should abort the whole write and set offset back to the original
> position? For this reason exactly the system call return the number
> of bytes written not true/false.
> 
> Anyway I have to address partial writes.

fio is more high level than a thin abstraction around syscalls. It
can block until the full amount is written. hence true/false.

Only the sockets in tarantool are low-level wrappers, other apis
aim at doing something useful.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list