Re: Ignite 3rd party persistency DataSourceBean Config in Java

2020-08-16 Thread Srikanta Patanjali
 Hi,

I'm using the "org.postgresql.ds.PGPoolingDataSource" dialect within the
datasource bean for Postgresql db.

The configuration of the datasource is independent of Ignite and can be
done as per the framework you are using.

Here is an example, if you are using Spring Boot -->
https://docs.spring.io/spring-boot/docs/2.1.13.RELEASE/reference/html/howto-data-access.html#howto-configure-a-datasource

An example via the programmatic configuration approach can be found here
-->
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java


Regards,

Srikanta

On 2020/08/14 07:03:32, "m...@coinflex.com"  wrote:
> Hi Experts, >
>
> From the ignite 3rd party rdbms persistency doc, it shows the example
with>
> xml config, like below, >
>
> >
>   >
>   >
>   >
> >
>
> Can help an example how to do at the java code? Use which bean? thanks,
>
> And btw, as currently, ignite dialet not support the postgresql, how can
we>
> use the postgresql to do the 3rd party persistency?  thanks a lot.>
>
>
>
>
>
> -->
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/>
>


Re: Consistently B+Tree is getting corrupted in a specific scenario

2020-08-16 Thread Srikanta Patanjali
Trying to rerun the cache loading and creating the index for only a
particular cache, I encountered the following NPE. This time around the
exception is not based on the content being indexed.

2020-08-16 20:40:39,958 ERROR o.a.i.l.l.Log4J2Logger
[jdbc-cache-loader-#117%ig_svc_cluster%] Critical system error detected.
Will be handled accordingly to configured handler
[hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0,
super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet
[SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]],
failureCtx=FailureContext [type=CRITICAL_ERROR, err=class
o.a.i.i.processors.cache.persistence.tree.CorruptedTreeException: B+Tree is
corrupted [pages(groupId, pageId)=[IgniteBiTuple [val1=521424340,
val2=281767034487301]], msg=Runtime failure on search row: SearchRow
[key=KeyCacheObjectImpl [part=68, val=525900, hasValBytes=true],
hash=525900, cacheId=0
org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException:
B+Tree is corrupted [pages(groupId, pageId)=[IgniteBiTuple [val1=521424340,
val2=281767034487301]], msg=Runtime failure on search row: SearchRow
[key=KeyCacheObjectImpl [part=68, val=525900, hasValBytes=true],
hash=525900, cacheId=0]]
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.corruptedTreeException(BPlusTree.java:5929)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.invoke(BPlusTree.java:1872)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.invoke0(IgniteCacheOffheapManagerImpl.java:1705)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.invoke(IgniteCacheOffheapManagerImpl.java:1688)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager$GridCacheDataStore.invoke(GridCacheOffheapManager.java:2444)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.invoke(IgniteCacheOffheapManagerImpl.java:445)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.storeValue(GridCacheMapEntry.java:4285)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.initialValue(GridCacheMapEntry.java:3426)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheEntryEx.initialValue(GridCacheEntryEx.java:807)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheEntryEx.initialValue(GridCacheEntryEx.java:772)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.loadEntry(GridDhtCacheAdapter.java:690)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.access$600(GridDhtCacheAdapter.java:104)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$5.apply(GridDhtCacheAdapter.java:640)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$5.apply(GridDhtCacheAdapter.java:636)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter$3.apply(GridCacheStoreManagerAdapter.java:535)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:470)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:434)
[ignite-core-2.8.1.jar!/:2.8.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[?:1.8.0_161]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_161]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_161]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
Caused by: java.lang.NullPointerException
at
org.apache.ignite.internal.processors.cache.GridCacheAtomicVersionComparator.compare(GridCacheAtomicVersionComparator.java:34)
~[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$1.apply(GridCacheMapEntry.java:3355)
~[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$1.apply(GridCacheMapEntry.java:3344)
~[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry$UpdateClosure.call(GridCacheMapEntry.java:5759)
~[ignite-core-2.8.1.jar!/:2.8.1]
at

Re: Consistently B+Tree is getting corrupted in a specific scenario

2020-08-16 Thread Srikanta Patanjali
Found the below exception with further analysis of the logs :

2020-08-16 13:34:14,306 ERROR o.a.i.l.l.Log4J2Logger
[jdbc-cache-loader-#10199%ig_svc_cluster%] Critical system error detected.
Will be handled accordingly to configured handler
[hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0,
super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet
[SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]],
failureCtx=FailureContext [type=CRITICAL_ERROR, err=class
o.a.i.i.processors.cache.persistence.tree.CorruptedTreeException: B+Tree is
corrupted [pages(groupId, pageId)=[IgniteBiTuple [val1=795360926,
val2=844420635324779]], cacheId=-175498, cacheName=T_NAME,
indexName=FOO_NAMESEARCH_BRN_DESC_IDX, msg=Runtime failure on row:
Row@6a714d32[ key: 311822, val: foo.TName [...REDACTED...] ][
...REDACTED... 
org.apache.ignite.internal.processors.cache.persistence.tree.CorruptedTreeException:
B+Tree is corrupted [pages(groupId, pageId)=[IgniteBiTuple [val1=795360926,
val2=844420635324779]], cacheId=-175498, cacheName=T_NAME,
indexName=FOO_NAMESEARCH_BRN_DESC_IDX, msg=Runtime failure on row:
Row@6a714d32[ key: 311822, val: foo.TName [...REDACTED...] ][...REDACTED...
]]
at
org.apache.ignite.internal.processors.query.h2.database.H2Tree.corruptedTreeException(H2Tree.java:673)
[ignite-indexing-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2380)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2327)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:428)
[ignite-indexing-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.addToIndex(GridH2Table.java:844)
[ignite-indexing-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.update(GridH2Table.java:782)
[ignite-indexing-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.store(IgniteH2Indexing.java:380)
[ignite-indexing-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.store(GridQueryProcessor.java:2079)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager.store(GridCacheQueryManager.java:409)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.finishUpdate(IgniteCacheOffheapManagerImpl.java:2627)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.invoke0(IgniteCacheOffheapManagerImpl.java:1713)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$CacheDataStoreImpl.invoke(IgniteCacheOffheapManagerImpl.java:1688)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.persistence.GridCacheOffheapManager$GridCacheDataStore.invoke(GridCacheOffheapManager.java:2444)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.invoke(IgniteCacheOffheapManagerImpl.java:445)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.storeValue(GridCacheMapEntry.java:4285)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheMapEntry.initialValue(GridCacheMapEntry.java:3426)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheEntryEx.initialValue(GridCacheEntryEx.java:807)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.GridCacheEntryEx.initialValue(GridCacheEntryEx.java:772)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.loadEntry(GridDhtCacheAdapter.java:690)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.access$600(GridDhtCacheAdapter.java:104)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$5.apply(GridDhtCacheAdapter.java:640)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter$5.apply(GridDhtCacheAdapter.java:636)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter$3.apply(GridCacheStoreManagerAdapter.java:535)
[ignite-core-2.8.1.jar!/:2.8.1]
at
org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore$1.call(CacheAbstractJdbcStore.java:470)
[ignite-core-2.8.1.jar!/:2.8.1]
at

Re: Cache configuration

2020-08-16 Thread C Ravikiran
As for the below, I have to change in xml and java code also.

Is there there any other possibility, without changing the java code, and
changing only xml file, shall we achive cache configuration??

As we don't have the java code access, we have the access to the
configuration
xml file.

Could you please help me with this?

Regards,
Ravikiran C




On Sun, 16 Aug, 2020, 12:57 am John Smith,  wrote:

> You can create templates in the XML and programmatically when you say
> getOrCreate() you can specify the template to use and pass in random name
> for the cache name ...
>
>
> https://apacheignite.readme.io/docs/cache-template#:~:text=Cache%20templates%20are%20useful%20when,CREATE%20TABLE%20and%20REST%20commands
> .
>
> On Sat., Aug. 15, 2020, 8:53 a.m. itsmeravikiran.c, <
> itsmeravikira...@gmail.com> wrote:
>
>> My cache ids are dynamic.
>> Is it possible to add cache configuration in xml.
>> I have checked, name property is mandatory. But i cannot add the name as
>> it's dynamic name.
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>