From: "Ilya Kosarev" <i.kosarev@tarantool.org> To: "Vladislav Shpilevoy" <v.shpilevoy@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v7 3/3] iproto: move greeting from tx thread to iproto Date: Thu, 24 Dec 2020 23:13:14 +0300 [thread overview] Message-ID: <1608840794.565118442@f186.i.mail.ru> (raw) In-Reply-To: <0e17b527-929c-b757-227a-f3b36c7906c5@tarantool.org> [-- Attachment #1: Type: text/plain, Size: 1980 bytes --] Hi! Sent v9 with fixes. Answers below. >Вторник, 22 декабря 2020, 17:21 +03:00 от Vladislav Shpilevoy < v.shpilevoy@tarantool.org >: > >Thanks for the patch! > >Did you even test it? > >I used exactly the same test as in my last email and I still get >"too many open files". Yes, it does print this. But it also actually closes sockets independently from tx. The issue is in input stop through iproto_connection_stop_msg_max_limit() with iproto_check_msg_max() condition, which is not really applicable while tx is not involved, so i changed the condition for limitation in v9. > >See 2 comments below. > >> diff --git a/src/box/iproto.cc b/src/box/iproto.cc >> index f7330af21d..b48a774c92 100644 >> --- a/src/box/iproto.cc >> +++ b/src/box/iproto.cc >> @@ -1484,8 +1544,16 @@ static inline struct iproto_msg * >> tx_accept_msg(struct cmsg *m) >> { >> struct iproto_msg *msg = (struct iproto_msg *) m; >> - tx_accept_wpos(msg->connection, &msg->wpos); >> - tx_fiber_init(msg->connection->session, msg->header.sync); >> + struct iproto_connection *con = msg->connection; >> + if (con->state != IPROTO_CONNECTION_ALIVE) { > >1. Connection state can only be changed and read by iproto thread. >The variable is not protected anyhow, so you can't simply read/write >it in 2 threads. Why is it not fine? I think it may lead to false sharing problem, but as far as i see it is not going to affect iproto thread, as long as we are not writing connection state in tx, only reading. > >> + /* >> + * Connection might be closed from iproto already. >> + * No action required in this case. >> + */ >> + return msg; > >2. Why do you return a message instead of NULL here, if the >connection is already dead? Ok, this can be simplified, fixed in v9. > >I ask you to spend more time on finishing the patch. If you will >rush to "fix" it without thinking it through, the review will >never end, and it will waste time both yours and mine. -- Ilya Kosarev [-- Attachment #2: Type: text/html, Size: 3802 bytes --]
next prev parent reply other threads:[~2020-12-24 20:13 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-22 0:49 [Tarantool-patches] [PATCH v7 0/3] iproto: greeting enhancement Ilya Kosarev 2020-12-22 0:49 ` [Tarantool-patches] [PATCH v7 1/3] iproto: move msg fields initialization to iproto_msg_new() Ilya Kosarev 2020-12-22 0:50 ` [Tarantool-patches] [PATCH v7 2/3] iproto: fix comment and add assert on destruction Ilya Kosarev 2020-12-22 0:50 ` [Tarantool-patches] [PATCH v7 3/3] iproto: move greeting from tx thread to iproto Ilya Kosarev 2020-12-22 14:21 ` Vladislav Shpilevoy 2020-12-24 20:13 ` Ilya Kosarev [this message] 2020-12-26 13:15 ` Vladislav Shpilevoy -- strict thread matches above, loose matches on Subject: below -- 2020-12-19 17:39 [Tarantool-patches] [PATCH v7 0/3] iproto: greeting enhancement Ilya Kosarev 2020-12-19 17:39 ` [Tarantool-patches] [PATCH v7 3/3] iproto: move greeting from tx thread to iproto Ilya Kosarev 2020-12-21 16:20 ` Vladislav Shpilevoy 2020-12-22 0:50 ` Ilya Kosarev
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=1608840794.565118442@f186.i.mail.ru \ --to=i.kosarev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v7 3/3] iproto: move greeting from tx thread to iproto' \ /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