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

Barry Oglesby resolved GEODE-670.
---------------------------------
    Resolution: Fixed

> 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
>            Assignee: Barry Oglesby
>            Priority: Major
>
> {{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
(v7.6.3#76005)

Reply via email to