[BUG]maintain ls reference for transfer read
This commit is contained in:
@ -169,9 +169,11 @@ public:
|
|||||||
write_flag_ = write_flag;
|
write_flag_ = write_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_src_tx_table_guard(const storage::ObTxTableGuard &tx_table_guard)
|
void set_src_tx_table_guard(const storage::ObTxTableGuard &tx_table_guard,
|
||||||
|
storage::ObLSHandle &src_ls_handle)
|
||||||
{
|
{
|
||||||
tx_table_guards_.src_tx_table_guard_ = tx_table_guard;
|
tx_table_guards_.src_tx_table_guard_ = tx_table_guard;
|
||||||
|
tx_table_guards_.src_ls_handle_ = src_ls_handle;
|
||||||
}
|
}
|
||||||
void init_replay(transaction::ObPartTransCtx &tx_ctx,
|
void init_replay(transaction::ObPartTransCtx &tx_ctx,
|
||||||
ObMemtableCtx &mem_ctx,
|
ObMemtableCtx &mem_ctx,
|
||||||
|
|||||||
@ -418,7 +418,7 @@ int ObAccessService::get_source_ls_tx_table_guard_(
|
|||||||
LOG_WARN("start request for transfer failed", KR(ret), K(user_data));
|
LOG_WARN("start request for transfer failed", KR(ret), K(user_data));
|
||||||
} else {
|
} else {
|
||||||
ObStoreCtx &ctx = ctx_guard.get_store_ctx();
|
ObStoreCtx &ctx = ctx_guard.get_store_ctx();
|
||||||
ctx.mvcc_acc_ctx_.set_src_tx_table_guard(src_tx_table_guard);
|
ctx.mvcc_acc_ctx_.set_src_tx_table_guard(src_tx_table_guard, ls_handle);
|
||||||
LOG_DEBUG("succ get src tx table guard", K(ret), K(src_ls->get_ls_id()), K(src_tx_table_guard), K(user_data));
|
LOG_DEBUG("succ get src tx table guard", K(ret), K(src_ls->get_ls_id()), K(src_tx_table_guard), K(user_data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,8 @@ class ObTxTableGuards
|
|||||||
public:
|
public:
|
||||||
ObTxTableGuards()
|
ObTxTableGuards()
|
||||||
: tx_table_guard_(),
|
: tx_table_guard_(),
|
||||||
src_tx_table_guard_() {}
|
src_tx_table_guard_(),
|
||||||
|
src_ls_handle_() {}
|
||||||
|
|
||||||
~ObTxTableGuards() { reset(); }
|
~ObTxTableGuards() { reset(); }
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ public:
|
|||||||
{
|
{
|
||||||
tx_table_guard_.reset();
|
tx_table_guard_.reset();
|
||||||
src_tx_table_guard_.reset();
|
src_tx_table_guard_.reset();
|
||||||
|
src_ls_handle_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void reuse()
|
void reuse()
|
||||||
@ -149,13 +151,15 @@ public:
|
|||||||
|
|
||||||
bool check_ls_offline();
|
bool check_ls_offline();
|
||||||
|
|
||||||
TO_STRING_KV(K_(tx_table_guard), K_(src_tx_table_guard));
|
TO_STRING_KV(K_(tx_table_guard), K_(src_tx_table_guard), K_(src_ls_handle));
|
||||||
|
|
||||||
public:
|
public:
|
||||||
storage::ObTxTableGuard tx_table_guard_;
|
storage::ObTxTableGuard tx_table_guard_;
|
||||||
|
|
||||||
// dml executed during transfer, src_tx_table_guard_ will be valid.
|
// when dml is executing during transfer, src_tx_table_guard_ and
|
||||||
|
// src_ls_handle_ will be valid.
|
||||||
storage::ObTxTableGuard src_tx_table_guard_;
|
storage::ObTxTableGuard src_tx_table_guard_;
|
||||||
|
storage::ObLSHandle src_ls_handle_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace storage
|
} // namespace storage
|
||||||
|
|||||||
Reference in New Issue
Block a user