[vector index] fix tx timeout
This commit is contained in:
parent
d210ef0f00
commit
002b43a4d6
@ -412,12 +412,13 @@ int ObDeleteLobMetaRowTask::process()
|
||||
ObTableScanIterator *table_scan_iter = nullptr;
|
||||
storage::ObLobManager* lob_mngr = MTL(storage::ObLobManager*);
|
||||
ObIDag *tmp_dag = get_dag();
|
||||
const uint64_t timeout_us = ObTimeUtility::current_time() + ObInsertLobColumnHelper::LOB_TX_TIMEOUT;
|
||||
if (OB_ISNULL(txs) || OB_ISNULL(tsc_service) || OB_ISNULL(lob_mngr)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("should not be null", K(ret), KP(txs), KP(tsc_service), KP(lob_mngr));
|
||||
} else if (OB_FAIL(ObInsertLobColumnHelper::start_trans(param_->ls_id_, true/*is_for_read*/, INT64_MAX, tx_desc))) {
|
||||
} else if (OB_FAIL(ObInsertLobColumnHelper::start_trans(param_->ls_id_, true/*is_for_read*/, timeout_us, tx_desc))) {
|
||||
LOG_WARN("fail to get tx_desc", K(ret));
|
||||
} else if (OB_FAIL(txs->get_ls_read_snapshot(*tx_desc, transaction::ObTxIsolationLevel::RC, param_->ls_id_, INT64_MAX, scan_param.snapshot_))) {
|
||||
} else if (OB_FAIL(txs->get_ls_read_snapshot(*tx_desc, transaction::ObTxIsolationLevel::RC, param_->ls_id_, timeout_us, scan_param.snapshot_))) {
|
||||
LOG_WARN("fail to get snapshot", K(ret));
|
||||
} else if (OB_FAIL(init_scan_param(scan_param))) {
|
||||
LOG_WARN("fail to init scan_param", K(ret));
|
||||
@ -445,7 +446,7 @@ int ObDeleteLobMetaRowTask::process()
|
||||
param_->tablet_id_,
|
||||
collation_type_,
|
||||
datum_row->storage_datums_[0],
|
||||
INT64_MAX,
|
||||
timeout_us,
|
||||
true))) {
|
||||
LOG_WARN("failed to delete lob column", K(ret));
|
||||
}
|
||||
|
@ -2534,6 +2534,7 @@ int ObDirectLoadSliceWriter::fill_vector_index_data(
|
||||
ObTxDesc *tx_desc = nullptr;
|
||||
ObMacroBlockSliceStore *macro_block_slice_store = nullptr;
|
||||
ObVectorIndexSliceStore *vec_idx_slice_store = static_cast<ObVectorIndexSliceStore *>(slice_store_);
|
||||
const uint64_t timeout_us = ObTimeUtility::current_time() + ObInsertLobColumnHelper::LOB_TX_TIMEOUT;
|
||||
if (OB_UNLIKELY(!is_inited_)) {
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("not init", K(ret));
|
||||
@ -2543,7 +2544,7 @@ int ObDirectLoadSliceWriter::fill_vector_index_data(
|
||||
} else if (OB_ISNULL(vec_idx_slice_store)) {
|
||||
// do nothing
|
||||
LOG_INFO("[vec index debug] maybe no data for this tablet", K(tablet_direct_load_mgr_->get_tablet_id()));
|
||||
} else if (OB_FAIL(ObInsertLobColumnHelper::start_trans(tablet_direct_load_mgr_->get_ls_id(), false/*is_for_read*/, INT64_MAX - ObInsertLobColumnHelper::LOB_ACCESS_TX_TIMEOUT, tx_desc))) {
|
||||
} else if (OB_FAIL(ObInsertLobColumnHelper::start_trans(tablet_direct_load_mgr_->get_ls_id(), false/*is_for_read*/, timeout_us, tx_desc))) {
|
||||
LOG_WARN("fail to get tx_desc", K(ret));
|
||||
} else if (OB_FAIL(vec_idx_slice_store->serialize_vector_index(&allocator_, tx_desc, lob_inrow_threshold))) {
|
||||
LOG_WARN("fail to do vector index snapshot data serialize", K(ret));
|
||||
|
@ -138,6 +138,7 @@ class ObLobMetaWriteIter;
|
||||
class ObInsertLobColumnHelper final
|
||||
{
|
||||
public:
|
||||
static const uint64_t LOB_TX_TIMEOUT = 86400000000; // 1 day
|
||||
static const uint64_t LOB_ACCESS_TX_TIMEOUT = 60000000; // 60s
|
||||
static const uint64_t LOB_ALLOCATOR_RESET_CYCLE = 128;
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user