You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Julien Vermillard (JIRA)" <ji...@apache.org> on 2007/01/12 10:02:27 UTC

[jira] Commented: (DIRMINA-331) StatCollector is not thread safe and some stats are being mixed up

    [ https://issues.apache.org/jira/browse/DIRMINA-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464122 ] 

Julien Vermillard commented on DIRMINA-331:
-------------------------------------------

Thanks for this patch, I'm reviewing it now, 
first comments :

easly fixable :
- code style is not the good one for 1.X branch, I know it's annoying :o)
- it's using java.util.concurrent in place of the backport

more problematic :
- it's preventing HTTP like protocols to calculate an average session throughput  
- doesn't give per service instantaneous throughtput stats, but total values (service life wide total)
- adding ScheduledWrites and QueuedEvents is a good idea but doesn't give those stats for the polling period, but again a total value

> StatCollector is not thread safe and some stats are being mixed up
> ------------------------------------------------------------------
>
>                 Key: DIRMINA-331
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-331
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.1
>            Reporter: Gaston Dombiak
>             Fix For: 1.1
>
>
> The instance variable polledSessions is not thread-safe (i.e. uses ArrayList) and its access is not always protected (e.g. StatCollector$Worker#run()). Under  heavy load this is producing an error in the Worker.
> The bytesReadThroughput statistic is incorrectly being set. It is adding up the throughput of written messages.
> Instance variables: msgWrittenThroughput, msgReadThroughput, bytesWrittenThroughputand bytesReadThroughput could be corrupted and return an unexpected value since they are not thread safe and 2 different threads may be changing them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira