parent
f6ee74f9cd
commit
fcf52f5ee3
@ -32,7 +32,7 @@ class ObMultiVersionValueIterator : public ObIMvccValueIterator {
|
||||
public:
|
||||
ObMultiVersionValueIterator();
|
||||
virtual ~ObMultiVersionValueIterator();
|
||||
// for iterating multi version row or uncommited transaction row
|
||||
// for iterating multi version row or uncommitted transaction row
|
||||
public:
|
||||
int init(const ObIMvccCtx& ctx, const transaction::ObTransSnapInfo& snapshot_info, const ObMemtableKey* key,
|
||||
ObMvccRow* value, transaction::ObTransStateTableGuard& trans_table_guard);
|
||||
|
@ -88,10 +88,10 @@ class ObLockWaitMgr : public share::ObThreadPool {
|
||||
protected:
|
||||
// obtain the request waiting on the row or transaction
|
||||
Node* fetch_waiter(uint64_t hash);
|
||||
// check whether there exits requests already timeoutt or need be
|
||||
// check whether there exits requests already timeout or need be
|
||||
// retried(session is killed, deadlocked or son on), and wakeup and retry them
|
||||
ObLink* check_timeout();
|
||||
// reclaim the chained reuqests
|
||||
// reclaim the chained requests
|
||||
void retire_node(ObLink*& tail, Node* node);
|
||||
// wakeup the request and put into the thread worker queue
|
||||
virtual int repost(Node* node);
|
||||
|
@ -449,7 +449,7 @@ class ObMtHash {
|
||||
// if the insert position is very forward and arr_size is big, there is no
|
||||
// need to access the same element repeatedly when recursively looking up, just decrease by half.
|
||||
// Note: bucket_count can decrease more rapidly, but as long as not access array elements,
|
||||
// it's accesptabale to loop multiple times(< 64) to decreasse by half.
|
||||
// it's acceptable to loop multiple times(< 64) to decrease by half.
|
||||
int64_t last_arr_idx = arr_idx;
|
||||
|
||||
while (OB_SUCC(ret) && arr_idx > 0) {
|
||||
|
@ -271,7 +271,7 @@ class ObPartitionMacroBlockObProducer {
|
||||
// end_key(1)
|
||||
// end_key(2)
|
||||
// ...
|
||||
// end_key(n) shoule be MAX
|
||||
// end_key(n) should be MAX
|
||||
class ObLogicBaseMetaProducer {
|
||||
public:
|
||||
ObLogicBaseMetaProducer() : is_inited_(false), partition_service_(NULL), arg_(NULL)
|
||||
|
@ -89,7 +89,7 @@ class ObPartitionGroupLockGuard {
|
||||
};
|
||||
|
||||
// ATTENTION:
|
||||
// The lock is designed to resolve the deadlock of code desgin between replay
|
||||
// The lock is designed to resolve the deadlock of code design between replay
|
||||
// engine and partition group. You need use the guard when adding replay engine
|
||||
// lock inside partition group
|
||||
class ObPGLockWithPendingReplayGuard {
|
||||
|
@ -281,7 +281,7 @@ struct ObSubmitReplayLogTask : public ObReplayTask {
|
||||
ObStorageLogType storage_log_type_; // recode log_type when failed to check condition before submit
|
||||
int64_t accum_checksum_;
|
||||
//-----------new added members for decoupling of replay engine and sliding window---------//
|
||||
// the info of last log that sliding window submiteed
|
||||
// the info of last log that sliding window submitted
|
||||
struct types::uint128_t last_slide_out_log_info_;
|
||||
// the info of last log that replay engine submit to replay queue
|
||||
struct types::uint128_t next_submit_log_info_;
|
||||
|
@ -57,7 +57,7 @@ class ObILogReplayEngine {
|
||||
// @param[in] need_replay:Whether the log needs to be replayed, the member change log and the
|
||||
// transaction log of D replica and log replica do not need to be replayed
|
||||
// @param[in] pkey:pkey of PG
|
||||
// @param[in] log_id:🔐id of submited log
|
||||
// @param[in] log_id:🔐id of submitted log
|
||||
// @param[in] log_ts:submit_timestamp of log
|
||||
// @retval OB_SUCCESS : The task is submitted successfully
|
||||
// @retval OB_NOT_INIT: ObLogReplayEngine has not been inited
|
||||
|
@ -47,7 +47,7 @@ class ObTenantWeakReadClusterVersionMgr {
|
||||
const int64_t total_part_count, const int64_t generate_tstamp, bool& is_new_server);
|
||||
|
||||
/// get min server version which not smaller than base_version
|
||||
/// if no statisfied server version, return base_version
|
||||
/// if no satisfied server version, return base_version
|
||||
int64_t get_version(const int64_t base_version, int64_t& skip_server_count, const bool need_print_server_info) const;
|
||||
|
||||
// get server count in cluster master cached registered servers
|
||||
|
@ -145,7 +145,7 @@ class TimeWheelBase : public share::ObThreadPool {
|
||||
|
||||
private:
|
||||
static const int64_t MAX_BUCKET = 10000;
|
||||
// scaner max sleep 1000000us
|
||||
// scanner max sleep 1000000us
|
||||
static const int64_t MAX_SCAN_SLEEP = 1000000;
|
||||
static const int64_t MAX_TIMER_NAME_LEN = 16;
|
||||
|
||||
|
@ -258,7 +258,7 @@ class ObCoordTransCtx : public ObDistTransCtx, public ObTsCbTask {
|
||||
ObPartitionArray unconfirmed_participants_;
|
||||
ObVersionArray participant_publish_version_array_;
|
||||
ObTransSplitInfoArray split_info_arr_;
|
||||
// TRUE by default for xa trans, false is set after receving xa commit
|
||||
// TRUE by default for xa trans, false is set after receiving xa commit
|
||||
bool is_waiting_xa_commit_;
|
||||
ObTransCtxArray part_ctx_arr_;
|
||||
// it is used to store the max commit_log_ts of participants
|
||||
|
@ -138,7 +138,7 @@ class ObTransState {
|
||||
// NOTICE: You should **CHANGE** the signature of all inherit class once you
|
||||
// change one of the signature of `ObTransCtx`.
|
||||
// For Example: If you change the signature of the function `commit` in
|
||||
// `ObTransCtx`, you should also modify the signatore of function `commit` in
|
||||
// `ObTransCtx`, you should also modify the signature of function `commit` in
|
||||
// `ObPartTransCtx`, `ObSlaveTransCtx`, `ObScheTransCtx` and `ObCoordTransCtx`
|
||||
class ObTransCtx : public TransCtxHashValue {
|
||||
friend class CtxLock;
|
||||
@ -690,7 +690,7 @@ class ObDistTransCtx : public ObTransCtx {
|
||||
ObITransRpc* rpc_;
|
||||
ObILocationAdapter* location_adapter_;
|
||||
int64_t commit_start_time_;
|
||||
// the variable is used to get the time between the trans start and respone to client
|
||||
// the variable is used to get the time between the trans start and response to client
|
||||
int64_t trans_start_time_;
|
||||
bool need_refresh_location_;
|
||||
int64_t trans_2pc_timeout_;
|
||||
|
@ -3631,7 +3631,7 @@ typedef common::ObSEArray<ObMemtableKeyInfo, 16, TransModulePageAllocator> ObMem
|
||||
typedef common::ObSEArray<ObAddrLogId, 10, TransModulePageAllocator> ObAddrLogIdArray;
|
||||
const int64_t OB_TRANS_REDO_LOG_RESERVE_SIZE = 128 * 1024;
|
||||
const int64_t MAX_ONE_PC_TRANS_SIZE = 1500000;
|
||||
// parmeters config transaction related
|
||||
// parameters config transaction related
|
||||
const int64_t TRANS_ACCESS_STAT_INTERVAL = 60 * 1000 * 1000; // 60s
|
||||
const int64_t TRANS_MEM_STAT_INTERVAL = 5 * 1000 * 1000; // 60s
|
||||
|
||||
|
@ -380,7 +380,7 @@ class ObTransPrepareLogHelper {
|
||||
// will be pre-allocated and recorded in the log body for updating
|
||||
// part_ctx's prepare_version during follower's replay process.
|
||||
// and it's equal to submit_timestamp recorded in log header, to avoid redundency,
|
||||
// this field is not used in version 2.2 and later versions.(it's not removed for compatability reasons)
|
||||
// this field is not used in version 2.2 and later versions.(it's not removed for compatibility reasons)
|
||||
int64_t local_trans_version_;
|
||||
common::ObVersion active_memstore_version_;
|
||||
common::ObString app_trace_id_str_;
|
||||
|
@ -201,9 +201,9 @@ class ObTransMsg : public ObTransMsgBase {
|
||||
// 2.extra param: scheduler_, coordinator_, participats_, status_, request_id_
|
||||
// 3.note:
|
||||
// (1) scheduler_,coordinator_, participants_: required, use to recovery after coordinator failure
|
||||
// (2) status_: required, used to idneify participant's commit/abort state
|
||||
// (2) status_: required, used to identify participant's commit/abort state
|
||||
// (3) request_id_: required, used to reject steal message
|
||||
// (4) xid: requried for XA
|
||||
// (4) xid: required for XA
|
||||
// (5) is_xa_prepare: required for XA
|
||||
int init(const uint64_t tenant_id, const ObTransID& trans_id, const int64_t msg_type, const int64_t trans_time,
|
||||
const common::ObPartitionKey& sender, const common::ObPartitionKey& receiver, const common::ObAddr& scheduler,
|
||||
@ -223,7 +223,7 @@ class ObTransMsg : public ObTransMsgBase {
|
||||
// (4) trans_version_: participant's local prepare version
|
||||
// (5) request_id_: used to reject steal message
|
||||
// (6) xid: required for XA
|
||||
// (7) is_xa_prepare: requried for XA
|
||||
// (7) is_xa_prepare: required for XA
|
||||
int init(const uint64_t tenant_id, const ObTransID& trans_id, const int64_t msg_type, const int64_t trans_time,
|
||||
const common::ObPartitionKey& sender, const common::ObPartitionKey& receiver, const common::ObAddr& scheduler,
|
||||
const common::ObPartitionKey& coordinator, const common::ObPartitionArray& participants,
|
||||
|
@ -705,7 +705,7 @@ class ObPartTransCtx : public ObDistTransCtx, public ObTsCbTask {
|
||||
bool is_redo_prepared_;
|
||||
bool has_gen_last_redo_log_;
|
||||
// this let clear_log's timestamp always
|
||||
// greate than commit timestamp of all participants
|
||||
// greater than commit timestamp of all participants
|
||||
int64_t clear_log_base_ts_;
|
||||
TransResultInfo result_info_;
|
||||
int64_t end_log_ts_for_batch_commit_;
|
||||
|
@ -302,7 +302,7 @@ void ObTransRPCCB<PC>::on_timeout()
|
||||
// 2. for read-only transaction, if remote server crash stop when tranaction commit,
|
||||
// scheduler no need to retry the request
|
||||
// 3. for read-write transaction, if need to rollback, location cache will be refreshed after timeout reached
|
||||
// clean cache of current transaction and resend reqeust to new leader
|
||||
// clean cache of current transaction and resend request to new leader
|
||||
// 4. for other type of messsage, don't handle but register asynchronouse task
|
||||
if (OB_SUCCESS != (tmp_ret = transaction::handle_trans_msg_callback(trans_service_,
|
||||
pkey_,
|
||||
|
Loading…
x
Reference in New Issue
Block a user