[
https://issues.apache.org/jira/browse/IGNITE-3939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15877855#comment-15877855
]
Vladimir Ozerov commented on IGNITE-3939:
-----------------------------------------
Introducing separate types we can significantly possible number of schemas. For
example, suppose an object with 20 {{long}} fields, which is not uncommon in
banking area, If all these fields could be zero at some point, we will end up
with {{2 ^ 20 ~ 1M}} schemas, which is unacceptable. Instead we can do the
following:
1) Define two special value states - {{NULL}} and {{ZERO}}
2) If value in one of these states, *do not write* it to body at all
3) In the footer write special offset value which will define that the object
is in particular special state.
4) Offset value is taken form the end of the possible range for the given
object length:
- 1-byte offsets: {{NULL = 255}}, {{ZERO = 254}}
- 2-bytes offsets: {{NULL = 65534}}, {{ZERO = 65533}}
- 4-bytes offsets: {{NULL = 4294967294}}, {{ZERO = 4294967293}}
> Compact long zero values binary representation
> ----------------------------------------------
>
> Key: IGNITE-3939
> URL: https://issues.apache.org/jira/browse/IGNITE-3939
> Project: Ignite
> Issue Type: Improvement
> Components: binary
> Affects Versions: 1.7
> Reporter: Andrew Mashenkov
> Assignee: Taras Ledkov
> Fix For: 2.0
>
>
> We can use separate type for Long zero values and exclude 8-byte value from
> binary representation. This will reduce memory footprint and network load.
> Compatibility with previous versions MUST be preserved.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)