[FEAT MERGE] impl vectorization 2.0
Co-authored-by: oceanoverflow <oceanoverflow@gmail.com> Co-authored-by: hezuojiao <hezuojiao@gmail.com> Co-authored-by: Monk-Liu <1152761042@qq.com>
This commit is contained in:
@ -36,10 +36,9 @@ ObDtlChannelLoop::ObDtlChannelLoop()
|
||||
ignore_interrupt_(false),
|
||||
tenant_id_(UINT64_MAX),
|
||||
timeout_(INT64_MAX),
|
||||
proxy_first_buffer_cache_(nullptr),
|
||||
spin_lock_(common::ObLatchIds::DTL_CHANNEL_LIST_LOCK),
|
||||
mock_addr_(),
|
||||
sentinel_node_(1, 0, mock_addr_),
|
||||
sentinel_node_(1, 0, mock_addr_, ObDtlChannel::DtlChannelType::LOCAL_CHANNEL),
|
||||
n_first_no_data_(0),
|
||||
op_monitor_info_(default_op_monitor_info_),
|
||||
first_data_get_(false),
|
||||
@ -69,10 +68,9 @@ ObDtlChannelLoop::ObDtlChannelLoop(ObMonitorNode &op_monitor_info)
|
||||
ignore_interrupt_(false),
|
||||
tenant_id_(UINT64_MAX),
|
||||
timeout_(INT64_MAX),
|
||||
proxy_first_buffer_cache_(nullptr),
|
||||
spin_lock_(common::ObLatchIds::DTL_CHANNEL_LIST_LOCK),
|
||||
mock_addr_(),
|
||||
sentinel_node_(1, 0, mock_addr_),
|
||||
sentinel_node_(1, 0, mock_addr_, ObDtlChannel::DtlChannelType::LOCAL_CHANNEL),
|
||||
n_first_no_data_(0),
|
||||
op_monitor_info_(op_monitor_info),
|
||||
first_data_get_(false),
|
||||
@ -98,32 +96,6 @@ void ObDtlChannelLoop::notify(ObDtlChannel &chan)
|
||||
cond_.signal();
|
||||
}
|
||||
|
||||
int ObDtlChannelLoop::has_first_buffer(uint64_t chan_id, bool &has_first_buffer)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
has_first_buffer = false;
|
||||
if (nullptr != proxy_first_buffer_cache_) {
|
||||
if (OB_FAIL(proxy_first_buffer_cache_->has_first_buffer(chan_id, has_first_buffer))) {
|
||||
LOG_WARN("failed to get first buffer", K(ret));
|
||||
} else {
|
||||
LOG_DEBUG("trace has first buffer", K(chan_id), KP(chan_id), K(has_first_buffer),
|
||||
KP(proxy_first_buffer_cache_), K(proxy_first_buffer_cache_->get_first_buffer_key()));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDtlChannelLoop::set_first_buffer(uint64_t chan_id)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (nullptr != proxy_first_buffer_cache_) {
|
||||
if (OB_FAIL(proxy_first_buffer_cache_->set_first_buffer(chan_id))) {
|
||||
LOG_WARN("failed to get first buffer", K(ret));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDtlChannelLoop::unregister_channel(ObDtlChannel &chan)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -413,10 +385,7 @@ int ObDtlChannelLoop::process_channel(int64_t &nth_channel)
|
||||
int ret = OB_EAGAIN;
|
||||
int64_t n_times = 0;
|
||||
bool last_row_in_buffer = false;
|
||||
if (ret == OB_EAGAIN && (OB_ISNULL(proxy_first_buffer_cache_) ||
|
||||
use_interm_result_ ||
|
||||
(0 < proxy_first_buffer_cache_->get_first_buffer_cnt() &&
|
||||
n_first_no_data_ < chans_.count()))) {
|
||||
if (ret == OB_EAGAIN && use_interm_result_) {
|
||||
// less then chan_cnt, then probe first buffer
|
||||
ret = process_channels(nullptr, nth_channel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user