You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kudu.apache.org by 邓光超 <53...@qq.com> on 2017/07/04 06:25:58 UTC
Question about blocked reactor thread
Hi,
I execute 20 (or more )thread for the same table Concurrently , the thread operation is as follows,
shared_ptr<KuduSession> session = table->client()->NewSession();
session->SetFlushMode(KuduSession::MANUAL_FLUSH);
session->SetTimeoutMillis(500);
For(int i = 0; i ++; i <=1000)
{
KuduInsert* insert = table->NewInsert();
KuduPartialRow* row = insert->mutable_row();
//set the different value
…………..
KUDU_CHECK_OK(session->Apply(insert));
Status s;
s = session->Flush();
}
the error I get is as follows, and I lost the data,
RPC callback for RPC call kudu.tserver.TabletServerService.Write -> {remote=127.0.0.1:7050, user_credentials={real_user=root}} blocked reactor thread for 74807.3us
RPC callback for RPC call kudu.tserver.TabletServerService.Write -> {remote=10.110.18.176:7050, user_credentials={real_user=root}} blocked reactor thread for 87339.7us
Guangchao Deng
Re: Question about blocked reactor thread
Posted by Alexey Serbin <as...@cloudera.com>.
Hi,
It's not quite clear from your message, but what is your question?
The messages you cited look like logs messages from tablet servers, not
error messages that client might receive. In general, the messages
about blocking the reactor thread in the tablet servers' logs are not
errors, but warnings: that could happen in case if the machine is under
relatively high load (e.g., many IO and CPU consuming tasks running
concurrently).
BTW, what was the status that 'Session::Flush()' returned? It makes
sense to check for the returned status in the code, something like is
done for the Session::Apply() results.
Also, the 'for ()' cycle you cited would not execute a single time. Is
that the exact excerpt from the real code or some
quick-copy-paste-update-for-email typo? If that's the former, consider
updating the condition and the increment parts of the 'for ()' cycle.
Hope this helps.
Best regards,
Alexey
On 7/3/17 11:25 PM, 邓光超 wrote:
>
> Hi,
>
> I execute 20 (or more )thread for the same table Concurrently
> , the thread operation is as follows,
>
> shared_ptr<KuduSession> session = table->client()->NewSession();
>
> session->SetFlushMode(KuduSession::MANUAL_FLUSH);
>
> session->SetTimeoutMillis(500);
>
> For(int i = 0; i ++; i <=1000)
>
> {
>
> KuduInsert* insert = table->NewInsert();
>
> KuduPartialRow* row = insert->mutable_row();
>
> //set the different value
>
> …………..
>
> KUDU_CHECK_OK(session->Apply(insert));
>
> Status s;
>
> s = session->Flush();
>
> }
>
> the error I get is as follows, and I lost the data,
>
> RPC callback for RPC call kudu.tserver.TabletServerService.Write ->
> {remote=127.0.0.1:7050, user_credentials={real_user=root}} blocked
> reactor thread for 74807.3us
>
> RPC callback for RPC call kudu.tserver.TabletServerService.Write ->
> {remote=10.110.18.176:7050, user_credentials={real_user=root}} blocked
> reactor thread for 87339.7us
>
> *Guangchao Deng*
>
> **
>
>