ignite-pds and binary objects

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ignite-pds and binary objects

gvvinblade
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
Reply | Threaded
Open this post in threaded view
|

Re: ignite-pds and binary objects

Alexey Goncharuk
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 <[hidden email]>:

> 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
>