chronix.server icon indicating copy to clipboard operation
chronix.server copied to clipboard

Query with multiple cores fails

Open shridharV opened this issue 4 years ago • 1 comments

If we load data into 2 cores, the inserts go thru fine.

If we query any one core at a time, the data comes thru fine.

But if we specific more than one core in the query, the query fails.

There is a time format error.

shridharV avatar Feb 28 '20 22:02 shridharV

We tested Chronix with 2 cores....here is comments from one of my colleagues; (This is an old log)

Test Multicore basics

Created 2 cores - chronix & chronix_new (same as chronix)

Store data in both cores by /update to each core with chronological data without batching - Stored 2 timeseries each into chronix & chronix_new (metrics with same name but with different points)

Perform chronix/solr query with shards parameter: I got couple of errors

NullPointerException - Due to unique key is not set. Currently we have commented out the “<uniqueKey>id</uniqueKey>”. To shards to work this must be needed. I uncommentout it. This resolve this error.

Conflict version - Solr expects the “version“ field to not set explicitly by our code when unique key is configured in schema. This is resolved by not setting “version” field from code.

ParseException - Could not parse date representation '[1567776032526' - Still debugging it. When I query from one core (without shards param), it returns metrics from that core only. It looks like while using shards the chronix server code not properly parsing the date param (name:container_memory_utilization_c AND start:NOW-24HOURS AND end:NOW) properly. However When I query without time filter (name:container_memory_utilization_c) it returns metrics from both cores.

The ParseException Trace is as follows:

2019-09-06 13:20:33.184 ERROR (qtp2093010349-27) [ x:chronix] o.a.s.h.RequestHandlerBase java.text.ParseException: Could not parse date representation '[1567776032526' at de.qaware.chronix.solr.query.date.DateQueryParser.getNumberRepresentation(DateQueryParser.java:115) at de.qaware.chronix.solr.query.date.DateQueryParser.getNumericQueryTerms(DateQueryParser.java:76) at de.qaware.chronix.solr.query.ChronixQueryHandler.handleRequestBody(ChronixQueryHandler.java:89) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2566) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:756) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:542) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:397)

Exception tail

2019-09-06 13:20:33.186 INFO (qtp2093010349-24) [ x:chronix_new] o.a.s.c.S.Request [chronix_new] webapp=/solr path=/select params={query_start_long=1567689632527&distrib=false&fl=id&fl=score&shards.purpose=4&start=0&fsv=true&shard.url=localhost:8983/solr/chronix_new&rows=10&version=2&query_end_long=1567776032527&q=name:container_memory_utilization_c+AND+-end:[+TO+1567689632526]+AND+-start:[1567776032526+TO+]&NOW=1567776032527&isShard=true&wt=javabin} status=500 QTime=1 2019-09-06 13:20:33.186 ERROR (qtp2093010349-24) [ x:chronix_new] o.a.s.s.HttpSolrCall null:java.text.ParseException: Could not parse date representation '[1567776032526'

shridharV avatar Feb 28 '20 23:02 shridharV