Search code examples
spring-bootcachingpersistenceignite

Apache Ignite Logs for joint two tables


I am getting some warn logs from Apache Ignite when i run execute join query. I don't know what to do. When I create them, I set CacheConfiguration cfg.setAffinity(AffinityFunction instance); instance has 24 parts both of them.and also same nodeAffinityKey.

For join two partitioned tables join condition should contain the equality operation of affinity keys. Left side: EMPLOYEE; right side: DEPARTMENT"

I need to solve this.


Solution

  • Turned out that the tables are non-colocated. That means they don't reside on the same node, i.e. no AffinityKey is configured.

    By default, Ignite assumes that the data is colocated and JOIN could be done locally. For distributed join of non-colocated tables, an extra configuraiton is required per the docs:

    If your query is non-colocated, you have to enable the non-colocated mode of query execution by setting SqlFieldsQuery.setDistributedJoins(true); otherwise, the results of the query execution may be incorrect.