diff --git a/cmake/Env.cmake b/cmake/Env.cmake index 5396ca20c8..90e2df60d2 100644 --- a/cmake/Env.cmake +++ b/cmake/Env.cmake @@ -62,8 +62,8 @@ ob_define(THIN_LTO_OPT "") ob_define(THIN_LTO_CONCURRENCY_LINK "") if(ENABLE_THIN_LTO) - set(THIN_LTO_OPT "-flto=thin -fwhole-program-vtables") - set(THIN_LTO_CONCURRENCY_LINK "-Wl,--thinlto-jobs=${LTO_JOBS},--lto-whole-program-visibility") + set(THIN_LTO_OPT "-flto=thin") + set(THIN_LTO_CONCURRENCY_LINK "-Wl,--thinlto-jobs=${LTO_JOBS}") endif() set(ob_close_modules_static_name "") diff --git a/src/storage/tx/ob_trans_define_v4.cpp b/src/storage/tx/ob_trans_define_v4.cpp index c8b42bdd14..c252b962b7 100644 --- a/src/storage/tx/ob_trans_define_v4.cpp +++ b/src/storage/tx/ob_trans_define_v4.cpp @@ -193,7 +193,8 @@ OB_SERIALIZE_MEMBER(ObTxReadSnapshot, snapshot_lsid_, parts_, snapshot_ls_role_, - committed_); + committed_, + snapshot_acquire_addr_); OB_SERIALIZE_MEMBER(ObTxPart, id_, addr_, epoch_, first_scn_, last_scn_); DEFINE_SERIALIZE(ObTxDesc::FLAG::FOR_FIXED_SER_VAL) @@ -1166,6 +1167,7 @@ ObTxReadSnapshot::ObTxReadSnapshot() source_(SRC::INVL), snapshot_lsid_(), snapshot_ls_role_(common::ObRole::INVALID_ROLE), + snapshot_acquire_addr_(), uncertain_bound_(0), parts_() {} @@ -1176,6 +1178,7 @@ ObTxReadSnapshot::~ObTxReadSnapshot() committed_ = false; source_ = SRC::INVL; snapshot_ls_role_ = common::INVALID_ROLE; + snapshot_acquire_addr_.reset(); uncertain_bound_ = 0; } @@ -1187,6 +1190,7 @@ void ObTxReadSnapshot::reset() source_ = SRC::INVL; snapshot_lsid_.reset(); snapshot_ls_role_ = common::INVALID_ROLE; + snapshot_acquire_addr_.reset(); uncertain_bound_ = 0; parts_.reset(); } @@ -1200,6 +1204,7 @@ int ObTxReadSnapshot::assign(const ObTxReadSnapshot &from) source_ = from.source_; snapshot_lsid_ = from.snapshot_lsid_; snapshot_ls_role_ = from.snapshot_ls_role_; + snapshot_acquire_addr_ = from.snapshot_acquire_addr_; uncertain_bound_ = from.uncertain_bound_; if (OB_FAIL(parts_.assign(from.parts_))) { TRANS_LOG(WARN, "assign snapshot fail", K(ret), K(from)); diff --git a/src/storage/tx/ob_trans_define_v4.h b/src/storage/tx/ob_trans_define_v4.h index 4348e0bd8c..be08f78fc5 100644 --- a/src/storage/tx/ob_trans_define_v4.h +++ b/src/storage/tx/ob_trans_define_v4.h @@ -262,6 +262,7 @@ struct ObTxReadSnapshot share::ObLSID snapshot_lsid_; // for source_ = LOCAL // common::ObRole snapshot_ls_role_; // for source_ = LS, only can be used for dup_table with a // max_commit_ts from the follower + ObAddr snapshot_acquire_addr_; // snapshot version acquired from which server int64_t uncertain_bound_; // for source_ GLOBAL ObSEArray parts_; @@ -279,6 +280,7 @@ struct ObTxReadSnapshot bool is_valid() const { return valid_; } bool is_committed() const { return committed_; } int format_source_for_display(char *buf, const int64_t buf_len) const; + const ObAddr get_snapshot_acquire_addr() const { return snapshot_acquire_addr_; } void reset(); int assign(const ObTxReadSnapshot &); ObTxReadSnapshot(); @@ -290,6 +292,7 @@ struct ObTxReadSnapshot K_(uncertain_bound), K_(snapshot_lsid), K_(snapshot_ls_role), + K_(snapshot_acquire_addr), K_(parts), K_(committed)); OB_UNIS_VERSION(1);