You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Oknet Xu (JIRA)" <ji...@apache.org> on 2016/05/27 09:01:12 UTC
[jira] [Updated] (TS-4487) Don't reschedule read depend on needs
while write buffer empty
[ https://issues.apache.org/jira/browse/TS-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oknet Xu updated TS-4487:
-------------------------
Description:
the code:
{code}
int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs);
{code}
In the SSLNetVConnection::load_buffer_and_write(), only set needs |= EVENTIO_WRITE on r>0.
At the end of write_to_net_io,
{code}
if (!buf.reader()->read_avail()) {
write_disable(nh, vc);
return; <------ return from here, but don't reschedule read
}
if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) {
write_reschedule(nh, vc);
}
if ((needs & EVENTIO_READ) == EVENTIO_READ) {
read_reschedule(nh, vc);
}
return;
{code}
was:
At the end of write_to_net_io
{code}
if (!buf.reader()->read_avail()) {
write_disable(nh, vc);
return; <------ return from here, but don't reschedule read
}
if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) {
write_reschedule(nh, vc);
}
if ((needs & EVENTIO_READ) == EVENTIO_READ) {
read_reschedule(nh, vc);
}
return;
{code}
> Don't reschedule read depend on needs while write buffer empty
> --------------------------------------------------------------
>
> Key: TS-4487
> URL: https://issues.apache.org/jira/browse/TS-4487
> Project: Traffic Server
> Issue Type: Bug
> Components: SSL
> Reporter: Oknet Xu
>
> the code:
> {code}
> int64_t r = vc->load_buffer_and_write(towrite, wattempted, total_written, buf, needs);
> {code}
> In the SSLNetVConnection::load_buffer_and_write(), only set needs |= EVENTIO_WRITE on r>0.
> At the end of write_to_net_io,
> {code}
> if (!buf.reader()->read_avail()) {
> write_disable(nh, vc);
> return; <------ return from here, but don't reschedule read
> }
> if ((needs & EVENTIO_WRITE) == EVENTIO_WRITE) {
> write_reschedule(nh, vc);
> }
> if ((needs & EVENTIO_READ) == EVENTIO_READ) {
> read_reschedule(nh, vc);
> }
> return;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)