druid icon indicating copy to clipboard operation
druid copied to clipboard

We will get different result from realtime task with a same query.

Open licl2014 opened this issue 8 years ago • 3 comments

our scenario as follows:

  1. druid version is 0.9.2
  2. we have a tranqulity task with task.partitions=2 and task.replicants=1, then there are 2 peon tasks running in middlemanager.
  3. i query from broker two times, and have a different result.

i think broker send this query to different peons 2 times.

queryableDruidServer = segment.lhs.pick(); only pick one server by random strategy or connectionCount strategy ,but this query should request the 2 peon tasks in middlemanager.

licl2014 avatar May 24 '18 13:05 licl2014

Can you share the query and the results you are getting ? It is quite possible that between the two queries tranquility might have sent more events and hence the results are different.

nishantmonu51 avatar May 24 '18 14:05 nishantmonu51

@nishantmonu51 thanks for your reply.

  1. I have a simple query which is select * from datasource where A='a', and the query result should be only one.
  2. First time , i do it then this request redirect to peon task1 and have a result with null.
  3. Second, i do it again,then this request redirect to peon task2 and have a right result.

What i mean is that this query should redirect to peon task1 and peon task2.

licl2014 avatar May 25 '18 00:05 licl2014

@nishantmonu51 thanks, we have solved it, it's our fault, because linear shardSpec lead to druid can't merge segment automatically, so we modify this to none shardSpec in tranquility, then broker use SingleElementPartitionChunk to build timeline rather than LinearPartitionChunk.

licl2014 avatar May 25 '18 03:05 licl2014