Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: Konstantin Osipov <kostja.osipov@gmail.com>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/2] Copy DSO module before load instead of symlink-ing
Date: Tue, 26 May 2020 14:11:51 +0300	[thread overview]
Message-ID: <20200526111151.3x52awj75lzgz4pt@tarantool.org> (raw)
In-Reply-To: <20200525143419.GA33892@atlas>

Hello,

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

On 25 май 17:34, Konstantin Osipov wrote:
> * Kirill Yukhin <kyukhin@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@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

  parent reply	other threads:[~2020-05-26 11:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  9:51 [Tarantool-patches] [PATCH 0/2] Fix C module reloading Kirill Yukhin
2020-05-20  9:51 ` [Tarantool-patches] [PATCH 1/2] Copy DSO module before load instead of symlink-ing Kirill Yukhin
2020-05-23 18:30   ` Konstantin Osipov
2020-05-25 13:13     ` Kirill Yukhin
2020-05-25 14:34       ` Konstantin Osipov
2020-05-25 15:18         ` Cyrill Gorcunov
2020-05-25 15:26           ` Cyrill Gorcunov
2020-05-25 16:45           ` Konstantin Osipov
2020-05-25 18:38             ` Cyrill Gorcunov
2020-05-26 11:11         ` Kirill Yukhin [this message]
2020-05-26 15:16       ` Cyrill Gorcunov
2020-05-27  9:17         ` Kirill Yukhin
2020-05-27 10:49           ` Cyrill Gorcunov
2020-05-20  9:51 ` [Tarantool-patches] [PATCH 2/2] Allow to set directory for copying DSO before load Kirill Yukhin
2020-05-29 10:59   ` Cyrill Gorcunov
2020-06-01 10:53     ` Kirill Yukhin
2020-05-20 20:41 ` [Tarantool-patches] [PATCH 0/2] Fix C module reloading Nikita Pettik
2020-05-21  8:41   ` Kirill Yukhin
2020-06-01 10:52 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200526111151.3x52awj75lzgz4pt@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=kostja.osipov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/2] Copy DSO module before load instead of symlink-ing' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox