[Tarantool-patches] [PATCH 1/2] Copy DSO module before load instead of symlink-ing

Kirill Yukhin kyukhin at tarantool.org
Tue May 26 14:11:51 MSK 2020


Hello,

Thanks a lot for your comments. My answers are inlined.

On 25 май 17:34, Konstantin Osipov wrote:
> * Kirill Yukhin <kyukhin at tarantool.org> [20/05/25 16:17]:
> > Hello,
> > 
> > Thanks a lot fr your inputs.
> > 
> > My answers are inlined. Iterative patch at the bottom.
> > I've force pushed updated branch.
> > 
> > On 23 май 21:30, Konstantin Osipov wrote:
> > > * Kirill Yukhin <kyukhin at tarantool.org> [20/05/20 12:54]:
> > > > +	fclose(source);
> > > > +	fclose(target);
> > > 
> > > 
> > > Please use libeio or, as last resort, sendfile().
> > > 
> > > Tarantool is a single threaded high-performance database and
> > > application server. It's not OK to block the event loop for a few
> > > hundred thousand instructions (and here we can easily get
> > > millions).
> > 
> > As a first try, I took a look @ coio_copyfile(), but it seems
> > that we cannot use anything which could yield as the routine
> > might be called from within a transaction.
> 
> There is no commitment to allow plugin reload within a
> transaction, and I doubt anyone would use it this way. It's a
> coincidence - since Vova changed to allow everything which doesn't
> yield to run within a transaction, it became allowed.

According to code module load occurs on first routine invocation.
That means, that it possibly occur inside a transaction. See
func_c_call() for details. Hence we are prohibited to yield.

> > +	off_t pos, left;
> > +	for (left = st.st_size, pos = 0; left > 0;) {
> > +		off_t ret = eio_sendfile_sync(dest_fd, source_fd, pos,
> > +					      st.st_size);
> 
> I wonder why do you use eio_sendfile_sync()?

Since we cannot yield from within a transaction.

> -- 
> Konstantin Osipov, Moscow, Russia
> https://scylladb.com

--
Regards, Kirill Yukhin


More information about the Tarantool-patches mailing list