You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Matthew Phillips (JIRA)" <ji...@apache.org> on 2009/07/14 09:03:15 UTC

[jira] Created: (DIRMINA-730) IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long

IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long
----------------------------------------------------------------------------------------

                 Key: DIRMINA-730
                 URL: https://issues.apache.org/jira/browse/DIRMINA-730
             Project: MINA
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.0-M6
         Environment: Mac OS X, Java 1.5
            Reporter: Matthew Phillips
            Priority: Minor


See IoServiceStatistics:330: 
        public final void increaseWrittenBytes(int increment, long currentTime)

All other methods take a long, but increment is an int in this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (DIRMINA-730) IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reopened DIRMINA-730:
---------------------------------------


Reopened... May be it was a bit too late yesturday when I checked this issue. 

> IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long
> ----------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-730
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-730
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-M6
>         Environment: Mac OS X, Java 1.5
>            Reporter: Matthew Phillips
>            Priority: Minor
>
> See IoServiceStatistics:330: 
>         public final void increaseWrittenBytes(int increment, long currentTime)
> All other methods take a long, but increment is an int in this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRMINA-730) IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRMINA-730.
---------------------------------------

    Resolution: Won't Fix

This is on purpose. The number of written bytes can't be larger than 2^32-1, so there is no reason to use a long to store this value.

> IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long
> ----------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-730
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-730
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-M6
>         Environment: Mac OS X, Java 1.5
>            Reporter: Matthew Phillips
>            Priority: Minor
>
> See IoServiceStatistics:330: 
>         public final void increaseWrittenBytes(int increment, long currentTime)
> All other methods take a long, but increment is an int in this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-730) IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long

Posted by "Matthew Phillips (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736936#action_12736936 ] 

Matthew Phillips commented on DIRMINA-730:
------------------------------------------

Not sure why it cannot go higher than 2^32-1? Surely MINA can handle writing more than 4GB of data?

And why does increaseReadBytes () take a long increment and getReadBytes () and getWrittenBytes () both return long's?

> IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long
> ----------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-730
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-730
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-M6
>         Environment: Mac OS X, Java 1.5
>            Reporter: Matthew Phillips
>            Priority: Minor
>
> See IoServiceStatistics:330: 
>         public final void increaseWrittenBytes(int increment, long currentTime)
> All other methods take a long, but increment is an int in this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRMINA-730) IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-730.
-------------------------------------

    Resolution: Invalid

No, I was right.

The 'int' is just used to store a transient number of written bytes, not the cumulative number, which is stored in a long. There is no chance this number can go above 2Gb, that would meant that all the data would be in memory. Your server would have crashed way before ...

An int is enough in this case.

> IoServiceStatistics.increaseWrittenBytes () takes an int as increment rather than a long
> ----------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-730
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-730
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-M6
>         Environment: Mac OS X, Java 1.5
>            Reporter: Matthew Phillips
>            Priority: Minor
>
> See IoServiceStatistics:330: 
>         public final void increaseWrittenBytes(int increment, long currentTime)
> All other methods take a long, but increment is an int in this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.