[
https://issues.apache.org/jira/browse/TS-4804?focusedWorklogId=27770&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-27770
]
ASF GitHub Bot logged work on TS-4804:
--------------------------------------
Author: ASF GitHub Bot
Created on: 01/Sep/16 19:29
Start Date: 01/Sep/16 19:29
Worklog Time Spent: 10m
Work Description: Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/952
Linux build *successful*! See
https://ci.trafficserver.apache.org/job/Github-Linux/560/ for details.
Issue Time Tracking
-------------------
Worklog Id: (was: 27770)
Time Spent: 1h 10m (was: 1h)
> Incorrect write.vio.ndone
> -------------------------
>
> Key: TS-4804
> URL: https://issues.apache.org/jira/browse/TS-4804
> Project: Traffic Server
> Issue Type: Bug
> Components: Core
> Reporter: Oknet Xu
> Assignee: Oknet Xu
> Fix For: 7.0.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> {code}
> int64_t
> UnixNetVConnection::load_buffer_and_write(int64_t towrite, MIOBufferAccessor
> &buf, int64_t &total_written, int &needs)
> {
> ...
> if (r > 0) {
> buf.reader()->consume(r);
> }
> total_written += r;
> ...
> return r;
> }
> {code}
> the 'r' is returned from socketManage.writev().
> 'total_written += r;' should be enclosed by if statement because the 'r' may
> be a negative value otherwise the total_written is incorrect.
> {code}
> void
> write_to_net_io(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)
> {
> ...
> int64_t r = vc->load_buffer_and_write(towrite, buf,
> total_written, needs);
> if (total_written > 0) {
> NET_SUM_DYN_STAT(net_write_bytes_stat, total_written);
> s->vio.ndone += total_written;
> }
> ...
> }
> {code}
> The incorrect total_written will cause the incorrect of write.vio.ndone.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)