Fix 3002, bug fix assert fail if broker scan failed

Change-Id: Ifb9eb057f104b99679efc04b930ea8263e1f4055
This commit is contained in:
zhaochun
2017-08-17 21:17:45 +08:00
committed by Zhao Chun
parent d9ee367b27
commit adac2b4b3c
3 changed files with 19 additions and 2 deletions

View File

@ -166,7 +166,11 @@ RowBatch::RowBatch(const RowDescriptor& row_desc, const TRowBatch& input_batch,
}
}
RowBatch::~RowBatch() {
void RowBatch::clear() {
if (_cleared) {
return;
}
_tuple_data_pool->free_all();
for (int i = 0; i < _io_buffers.size(); ++i) {
_io_buffers[i]->return_buffer();
@ -181,6 +185,11 @@ RowBatch::~RowBatch() {
_mem_tracker->release(_tuple_ptrs_size);
_tuple_ptrs = NULL;
}
_cleared = true;
}
RowBatch::~RowBatch() {
clear();
}
int RowBatch::serialize(TRowBatch* output_batch) {