You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Mark Hanson <ha...@vmware.com> on 2021/04/14 22:43:06 UTC

Stats deprecations?

Hi,

So I am making some stats changes that are pretty minor, but I was looking at the fact that we have a ton of deprecated stuff about incInt and getInt. Can we convert those to longs? This would mean changing storage and return types.

Thanks,
Mark

Re: Stats deprecations?

Posted by Jacob Barrett <ja...@vmware.com>.
The deprecated int methods are there for API compatibility but are backed by the LongAdder that backs the long stats.

If you find any stats still using the int methods feel free to update them to use the long methods.

See https://issues.apache.org/jira/browse/GEODE-6424 and related tickets.

-Jake


On Apr 14, 2021, at 3:43 PM, Mark Hanson <ha...@vmware.com>> wrote:

Hi,

So I am making some stats changes that are pretty minor, but I was looking at the fact that we have a ton of deprecated stuff about incInt and getInt. Can we convert those to longs? This would mean changing storage and return types.

Thanks,
Mark


Re: Stats deprecations?

Posted by Darrel Schneider <da...@vmware.com>.
It might break something but it should not be too bad. Internal product features are not supposed to read stat values and make decisions based on them because geode allows stat storage to be disabled. Also all these callers of the deprecated methods will be internal. So most of the code that calls a gettor for a stat value is probably a test. Since we now store that stat as a 64-bit value (instead of 32-bit) it would probably be best if we didn't truncate when we read it which is what is happening now when getInt is called. It would be good to do this in its own PR since it will touch a lot of code.
________________________________
From: Mark Hanson <ha...@vmware.com>
Sent: Wednesday, April 14, 2021 4:13 PM
To: dev@geode.apache.org <de...@geode.apache.org>
Subject: Re: Stats deprecations?

The one gotcha which I am totally fine with is that the actual calls like get<Whatever> will return long rather than int. Is that going to break anything?


On 4/14/21, 4:10 PM, "Dan Smith" <da...@vmware.com> wrote:

    Looks like those methods were deprecated in GEODE-6850. If I'm reading that correctly, there is no reason not to change the calls to incLong, getLong, etc. I'd say go for it.

    -Dan
    ________________________________
    From: Mark Hanson <ha...@vmware.com>
    Sent: Wednesday, April 14, 2021 3:43 PM
    To: dev@geode.apache.org <de...@geode.apache.org>
    Subject: Stats deprecations?

    Hi,

    So I am making some stats changes that are pretty minor, but I was looking at the fact that we have a ton of deprecated stuff about incInt and getInt. Can we convert those to longs? This would mean changing storage and return types.

    Thanks,
    Mark


Re: Stats deprecations?

Posted by Mark Hanson <ha...@vmware.com>.
The one gotcha which I am totally fine with is that the actual calls like get<Whatever> will return long rather than int. Is that going to break anything?


On 4/14/21, 4:10 PM, "Dan Smith" <da...@vmware.com> wrote:

    Looks like those methods were deprecated in GEODE-6850. If I'm reading that correctly, there is no reason not to change the calls to incLong, getLong, etc. I'd say go for it.

    -Dan
    ________________________________
    From: Mark Hanson <ha...@vmware.com>
    Sent: Wednesday, April 14, 2021 3:43 PM
    To: dev@geode.apache.org <de...@geode.apache.org>
    Subject: Stats deprecations?

    Hi,

    So I am making some stats changes that are pretty minor, but I was looking at the fact that we have a ton of deprecated stuff about incInt and getInt. Can we convert those to longs? This would mean changing storage and return types.

    Thanks,
    Mark


Re: Stats deprecations?

Posted by Dan Smith <da...@vmware.com>.
Looks like those methods were deprecated in GEODE-6850. If I'm reading that correctly, there is no reason not to change the calls to incLong, getLong, etc. I'd say go for it.

-Dan
________________________________
From: Mark Hanson <ha...@vmware.com>
Sent: Wednesday, April 14, 2021 3:43 PM
To: dev@geode.apache.org <de...@geode.apache.org>
Subject: Stats deprecations?

Hi,

So I am making some stats changes that are pretty minor, but I was looking at the fact that we have a ton of deprecated stuff about incInt and getInt. Can we convert those to longs? This would mean changing storage and return types.

Thanks,
Mark