ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "aaron@tophold.com" <aa...@tophold.com>
Subject Re: Re: When client node query a cache with JDBC storage, report miss the dataSourceBean
Date Thu, 09 Nov 2017 01:34:03 GMT
Got it thanks Ilya!  

So if we try to totally isolate the client from server, may need start a facade to supply
query only service. 


From: Ilya Kasnacheev
Date: 2017-11-08 19:57
To: user
Subject: Re: When client node query a cache with JDBC storage, report miss the dataSourceBean
Hello Aaron!

- In Ignite, client nodes are always aware of backed storage (cacheStoreFactory) of all caches.
This is by design.

- In Ignite, client nodes perform operations on backed storage DB for transactional caches.
The reasoning here is that transaction commit has to happen in one place, and that place is
the client which initiated transaction.
Otherwise there's no reliable way to make sure that backing non-distributed DB is updated
(or rolled back) properly.

- For atomic caches, client nodes should not be using cacheStore to talk to DB but still instantiate
it in full.

Please make sure that client has all the beans required for cacheStore operation.

Ilya Kasnacheev

2017-11-08 13:52 GMT+03:00 aaron@tophold.com <aaron@tophold.com>:
hi All, 

My server side cache configuration with JDBC storage as back-end.  whose data source refer
to a bean "serverDatasource" from server spring context. 

While a pure client node to fetch data from the server, it always report:

GridCachePartitionExchangeManager - Failed to process custom exchange task: ClientCacheChangeDummyDiscoveryMessage
ac-a3c8a8672770, cachesToClose=null, startCaches=[ProductEntry]]
org.apache.ignite.IgniteException: Failed to load bean in application context [beanName=serverDatasource,
t@2667f029: startup date [Wed Nov 08 10:36:06 UTC 2017]; root of context hierarchy]
at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:183)
at org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory.create(CacheJdbcPojoStoreFactory.java:100)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.createCache(GridCacheProcessor.java:1318)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1799)
at org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCacheStartRequests(CacheAffinitySharedManager.java:428)
at org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager.processClientCachesChanges(CacheAffinitySharedManager.java:611)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:338)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.processCustomTask(GridCachePartitionExchangeManager.java:2142)
at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2231)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) ~[ignite-core-2.3.0.jar!/:2.3.0]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

 The client side never ever should have this "serverDatasource" in its context, also client
suppose not to touch this DB. 

Client as : <property name="clientMode" value="true"/>

Could you please advice, how suppose can we stop this check?  even trigger a read/write through,
this suppose performed by the Server side? not the client right? 

BTW I already set: System.setProperty(org.apache.ignite.IgniteSystemProperties.IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK,
"true");  but this not work. 

Thanks for your time



View raw message