Fix NPE when broadcast dtl channel can't allocate buffer

This commit is contained in:
obdev 2021-07-15 10:36:13 +08:00 committed by wangzelin.wzl
parent e3a4db0a24
commit e76ba6bf1c
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ int ObDtlChanAgent::switch_buffer(int64_t need_size)
if (OB_SUCC(ret)) {
current_buffer_->set_bcast();
dtl_buf_encoder_.set_new_buffer(current_buffer_);
} else {
} else if (nullptr != current_buffer_) {
dtl_buf_allocator_.free_buf(*bcast_ch, current_buffer_);
}

View File

@ -59,7 +59,7 @@ int ObDtlFlowControl::init(uint64_t tenant_id, int64_t chan_cnt)
} else {
ObTenantConfigGuard tenant_config(TENANT_CONF(tenant_id));
if (tenant_config.is_valid() && true == tenant_config->_px_message_compression) {
compressor_type_ = ObCompressorType::STREAM_LZ4_COMPRESSOR;
compressor_type_ = ObCompressorType::LZ4_COMPRESSOR;
}
is_init_ = true;
tenant_id_ = tenant_id;