You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Seliverstov Igor <gv...@gmail.com> on 2017/05/25 11:46:38 UTC
ignite-pds and binary objects
Hi guys!
Seems the new persistance feature is not compatable with our default
configuration.
A simplest test where I store an object type, restart the grid and try to
get the object by its key fails with NPE:
java.lang.NullPointerException
at
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.metadata(CacheObjectBinaryProcessorImpl.java:492)
at
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl$2.metadata(CacheObjectBinaryProcessorImpl.java:174)
at
org.apache.ignite.internal.binary.BinaryContext.metadata(BinaryContext.java:1231)
at
org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:1987)
at
org.apache.ignite.internal.binary.BinaryReaderExImpl.<init>(BinaryReaderExImpl.java:283)
at
org.apache.ignite.internal.binary.BinaryReaderExImpl.<init>(BinaryReaderExImpl.java:182)
at
org.apache.ignite.internal.binary.BinaryObjectImpl.reader(BinaryObjectImpl.java:827)
at
org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:791)
at
org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142)
at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:273)
at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:161)
at
org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:148)
at
org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1713)
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.setResult(GridPartitionedSingleGetFuture.java:648)
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.localGet(GridPartitionedSingleGetFuture.java:441)
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.mapKeyToNode(GridPartitionedSingleGetFuture.java:327)
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.map(GridPartitionedSingleGetFuture.java:212)
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.init(GridPartitionedSingleGetFuture.java:204)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.getAsync0(GridDhtAtomicCache.java:1460)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$1600(GridDhtAtomicCache.java:130)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$16.apply(GridDhtAtomicCache.java:528)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$16.apply(GridDhtAtomicCache.java:526)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:821)
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.getAsync(GridDhtAtomicCache.java:526)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.get0(GridCacheAdapter.java:4458)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:4439)
at
org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(GridCacheAdapter.java:1326)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.get(IgniteCacheProxy.java:1180)
Guess it happens because we don't store bynary metadata (with
use-compact-footer=false everything works fine).
Any thoughts on that?
I suppose we have to store the binary metadata if the persistence is on.
Regards,
Igor
Re: ignite-pds and binary objects
Posted by Alexey Goncharuk <al...@gmail.com>.
Hi Igor,
The current implementation assumes that compactFooters should be disabled,
we did not enforce this configuration yet. However, generally, you are
right, and we must have a local-only metadata storage which will keep
binary metadata.
2017-05-25 14:46 GMT+03:00 Seliverstov Igor <gv...@gmail.com>:
> Hi guys!
>
> Seems the new persistance feature is not compatable with our default
> configuration.
>
> A simplest test where I store an object type, restart the grid and try to
> get the object by its key fails with NPE:
>
> java.lang.NullPointerException
> at
> org.apache.ignite.internal.processors.cache.binary.
> CacheObjectBinaryProcessorImpl.metadata(CacheObjectBinaryProcessorImpl
> .java:492)
> at
> org.apache.ignite.internal.processors.cache.binary.
> CacheObjectBinaryProcessorImpl$2.metadata(CacheObjectBinaryProcessorImpl
> .java:174)
> at
> org.apache.ignite.internal.binary.BinaryContext.metadata(
> BinaryContext.java:1231)
> at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(
> BinaryReaderExImpl.java:1987)
> at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.<
> init>(BinaryReaderExImpl.java:283)
> at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.<
> init>(BinaryReaderExImpl.java:182)
> at
> org.apache.ignite.internal.binary.BinaryObjectImpl.
> reader(BinaryObjectImpl.java:827)
> at
> org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(
> BinaryObjectImpl.java:791)
> at
> org.apache.ignite.internal.binary.BinaryObjectImpl.value(
> BinaryObjectImpl.java:142)
> at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.
> unwrapBinary(CacheObjectContext.java:273)
> at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.
> unwrapBinaryIfNeeded(CacheObjectContext.java:161)
> at
> org.apache.ignite.internal.processors.cache.CacheObjectContext.
> unwrapBinaryIfNeeded(CacheObjectContext.java:148)
> at
> org.apache.ignite.internal.processors.cache.GridCacheContext.
> unwrapBinaryIfNeeded(GridCacheContext.java:1713)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.
> GridPartitionedSingleGetFuture.setResult(GridPartitionedSingleGetFuture
> .java:648)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.
> GridPartitionedSingleGetFuture.localGet(GridPartitionedSingleGetFuture
> .java:441)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.
> GridPartitionedSingleGetFuture.mapKeyToNode(GridPartitionedSingleGetFuture
> .java:327)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.
> GridPartitionedSingleGetFuture.map(GridPartitionedSingleGetFuture
> .java:212)
> at
> org.apache.ignite.internal.processors.cache.distributed.dht.
> GridPartitionedSingleGetFuture.init(GridPartitionedSingleGetFuture
> .java:204)
> at
> org.apache.ignite.internal.processors.cache.distributed.
> dht.atomic.GridDhtAtomicCache.getAsync0(GridDhtAtomicCache.java:1460)
> at
> org.apache.ignite.internal.processors.cache.distributed.
> dht.atomic.GridDhtAtomicCache.access$1600(GridDhtAtomicCache.java:130)
> at
> org.apache.ignite.internal.processors.cache.distributed.
> dht.atomic.GridDhtAtomicCache$16.apply(GridDhtAtomicCache.java:528)
> at
> org.apache.ignite.internal.processors.cache.distributed.
> dht.atomic.GridDhtAtomicCache$16.apply(GridDhtAtomicCache.java:526)
> at
> org.apache.ignite.internal.processors.cache.distributed.
> dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:821)
> at
> org.apache.ignite.internal.processors.cache.distributed.
> dht.atomic.GridDhtAtomicCache.getAsync(GridDhtAtomicCache.java:526)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.get0(
> GridCacheAdapter.java:4458)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(
> GridCacheAdapter.java:4439)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.get(
> GridCacheAdapter.java:1326)
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheProxy.get(
> IgniteCacheProxy.java:1180)
>
> Guess it happens because we don't store bynary metadata (with
> use-compact-footer=false everything works fine).
>
> Any thoughts on that?
>
> I suppose we have to store the binary metadata if the persistence is on.
>
> Regards,
> Igor
>