Open spaces-X opened 2 years ago
DCHECK failure in memtracker destructor is caused by memtrack consumed the BitmapValue without releasing later in AggregateFuncTraits::init.
As follows:
template <>
struct AggregateFuncTraits<OLAP_FIELD_AGGREGATION_BITMAP_UNION, OLAP_FIELD_TYPE_OBJECT> {
static void init(RowCursorCell* dst, const char* src, bool src_null, MemPool* mem_pool,
ObjectPool* agg_pool) {
DCHECK_EQ(src_null, false);
dst->set_not_null();
auto* src_slice = reinterpret_cast<const Slice*>(src);
auto* dst_slice = reinterpret_cast<Slice*>(dst->mutable_cell_ptr());
// we use zero size represent this slice is a agg object
dst_slice->size = 0;
auto bitmap = new BitmapValue(src_slice->data);
// here consumed size of (BitmapValue) without releasing later.
mem_pool->mem_tracker()->Consume(sizeof(BitmapValue));
dst_slice->data = (char*)bitmap;
agg_pool->add(bitmap);
}
...
}
Any suggestiones here or we can just ignore this DCHECK ? @morningman @liutang123
Search before asking
Version
tested in
pre-0.15.0-5fc0a9f
andtrunk-a1d1bd8 (0.15)
What's Wrong?
DCHECK failed in Memtracker destructor:
consumption() == 0
What You Expected?
DCHECK pass
How to Reproduce?
Anything Else?
be.INFO
No response
Are you willing to submit PR?
Code of Conduct