ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4538) BinaryObjectImpl: lack of context information upon deserialization
Date Fri, 03 Feb 2017 11:04:51 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851335#comment-15851335
] 

Vladimir Ozerov commented on IGNITE-4538:
-----------------------------------------

[~ein], my comments:
1) I accidentally merged your branch with other unrelated branch. I reverted changes, but
now your PR is based on {{ignite-2.0}}, not on {{master}}. 
2) Please see and review my changes to exception handling in {{BinaryClassDescriptor}} and
{{BinaryFieldAccessor}}.
3) Changes to {{BinaryUtils}} are invalid:
- "HANDLE" is not a field type and hence should not reside in {{FIELD_TYPE_NAMES}}.
- Assertion in {{fieldTypeName}} is incorrect: you may easily receive arbitrary flag value
in case of broken format, which is nevertheless within array boundaries.

4) {{BinaryReaderExImpl}}:
- {{wrapFieldName}} - Invalid JavaDoc format
- {{wrapFieldName}} - why don't you check for {{SENSITIVE}} flag?
- Why do you catch only {{BinaryObjectException}}, but not {{Exception}}?
- You wrap exceptions only for primitives. What about dozens of other field types?

> BinaryObjectImpl: lack of context information upon deserialization
> ------------------------------------------------------------------
>
>                 Key: IGNITE-4538
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4538
>             Project: Ignite
>          Issue Type: Improvement
>          Components: binary
>    Affects Versions: 1.7, 1.8
>            Reporter: Alexandr Kuramshin
>            Assignee: Vladimir Ozerov
>             Fix For: 2.0
>
>
> Taking an error we don't know the cache name was accessed, the type of BinaryClassDescriptor
was used, and the entry was accessed (the key of an entry should be logged with respect to
the *include sensitive* system property).
> Such context information should be appended by wrapping inner exception on the every
key stack frame.
> {noformat}
> org.apache.ignite.binary.BinaryObjectException: Unexpected flag value [pos=24, expected=4,
actual=9]
>                 at org.apache.ignite.internal.binary.BinaryReaderExImpl.checkFlagNoHandles(BinaryReaderExImpl.java:1423)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryReaderExImpl.readLongNullable(BinaryReaderExImpl.java:723)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryFieldAccessor$DefaultFinalClassAccessor.readFixedType(BinaryFieldAccessor.java:677)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryFieldAccessor$DefaultFinalClassAccessor.read(BinaryFieldAccessor.java:639)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryClassDescriptor.java:818)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1481)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:717)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:143)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:272)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:160)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:147)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1706)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager$PeekValueExpiryAwareIterator.advance(GridCacheQueryManager.java:2875)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager$PeekValueExpiryAwareIterator.<init>(GridCacheQueryManager.java:2814)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager$PeekValueExpiryAwareIterator.<init>(GridCacheQueryManager.java:2752)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager$5.<init>(GridCacheQueryManager.java:863)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.scanIterator(GridCacheQueryManager.java:863)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.scanQueryLocal(GridCacheQueryManager.java:1436)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter.executeScanQuery(GridCacheQueryAdapter.java:552)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.GridCacheAdapter.igniteIterator(GridCacheAdapter.java:4115)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.GridCacheAdapter.igniteIterator(GridCacheAdapter.java:4092)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
>                 at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.iterator(IgniteCacheProxy.java:1979)
~[ignite-core-1.10.1.ea7.jar:1.10.1.ea7]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message