You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2016/02/05 19:52:45 UTC

[jira] [Updated] (GEODE-670) The size of the GatewaySenderEvent is sometimes calculated by serializing its value rather than using the Sizeable interface

     [ https://issues.apache.org/jira/browse/GEODE-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Darrel Schneider updated GEODE-670:
-----------------------------------
    Component/s:     (was: core)
                 wan

> The size of the GatewaySenderEvent is sometimes calculated by serializing its value rather than using the Sizeable interface
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-670
>                 URL: https://issues.apache.org/jira/browse/GEODE-670
>             Project: Geode
>          Issue Type: Bug
>          Components: wan
>            Reporter: Barry Oglesby
>
> {{BucketRegion calcMemSize}} special-cases {{GatewaySenderEventImpl}} to get just its value. In most cases, the value is a byte[], so the size is just the length of the byte[]. If the {{GatewayEventSubstitutionFilter}} is used, then the event's value is null and its valueObject is a java object. In this case, the valueObject is serialized and returned. {{BucketRegion calcMemSize}} then just returns the length of that byte{} using {{CachedDeserializableFactory calcMemSize}}.
> {{GatewaySenderEventImpl}} shouldn't be special-cased. It can be sized using {{CachedDeserializableFactory calcMemSize}} just like other values. This will invoke {{GatewaySenderEventImpl getSizeInBytes}} which does the right thing for the valueObject by invoking {{CachedDeserializableFactory calcMemSize}} on it. This method uses the {{Sizeable}} interface if appropriate. The resulting size will be a bit bigger but more accurate than what is currently reported.



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