[
https://issues.apache.org/jira/browse/KYLIN-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16199892#comment-16199892
]
fengYu commented on KYLIN-2926:
-------------------------------
for simply modify and test, I modify the function like this :
private void enqueueFromDump(int index) {
if (dumpIterators.get(index) != null &&
dumpIterators.get(index).hasNext()) {
Pair<byte[], byte[]> pair = dumpIterators.get(index).next();
minHeap.offer(new Pair(pair.getKey(), index));
Object[] metricValues = new Object[metrics.trueBitCount()];
BufferedMeasureCodec codec= request.createMeasureCodec();
codec.decode(ByteBuffer.wrap(pair.getValue()),
metricValues);
dumpCurrentValues.set(index, metricValues);
}
}
the result will be correct.
> DumpMerger return incorrect results
> -----------------------------------
>
> Key: KYLIN-2926
> URL: https://issues.apache.org/jira/browse/KYLIN-2926
> Project: Kylin
> Issue Type: Bug
> Affects Versions: v2.0.0
> Reporter: fengYu
> Assignee: fengYu
>
> I our scenario, a cube query will get wrong result once coprocessor need to
> spill to disk, Our version is 2.0.0 and I find the root cause is that in
> DumpMerger.enqueueFromDump
> because in DataTypeSerializer kylin use a ThreadLocal variable ‘current’, It
> leading to different elements in dumpCurrentValues share the same object, so
> next fill up measure values will change the existing values.
> the incorrect measures is HLLC.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)