[ 
https://issues.apache.org/jira/browse/TS-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301541#comment-14301541
 ] 

Bryan Call commented on TS-162:
-------------------------------

commit 4d3a89239840b6ea87c750f0ca7218fbd66264d0
Author: Bryan Call <bc...@apache.org>
Date:   Tue Mar 23 22:14:26 2010 +0000

    TS-162 Wrapped a mutex around the updating of the lasts and globals in
    the sync and clear functions.  Changed the get and set in cache for the
    stats to increment.

    git-svn-id: 
https://svn.apache.org/repos/asf/incubator/trafficserver/traffic/trunk@926813 
13f79535-47bb-0310-9956-ffa450edef68

> inconsistencies in the stats system - there are incorrect assumtions on 
> sychronization between threads
> ------------------------------------------------------------------------------------------------------
>
>                 Key: TS-162
>                 URL: https://issues.apache.org/jira/browse/TS-162
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Metrics
>            Reporter: Bryan Call
>            Assignee: Bryan Call
>         Attachments: stats_bcall_001.diff, stats_bcall_002.diff
>
>
> There is a problem with the current stats being inconsistent.  The problem is 
> that the net threads each have their own stats which they modify and the 
> aggregation thread also modifies the same stat value.  There is no proper 
> synchronization for this to work correctly.  The aggregation thread does an 
> atomic swap to zero the net threads stat value, but the local thread doesn't 
> use atomics and only increments the value.  This will lead to 
> inconsistencies...
> A better design is to *only* have the net threads modify their local stats 
> and have the aggregation thread handle totalling the values in a separate 
> stat structure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to