fix update_merge_status repeatedly report OB_INNER_STAT_ERROR when checksum_error exists
This commit is contained in:
@ -657,6 +657,8 @@ int ObMajorMergeScheduler::try_update_global_merged_scn(const int64_t expected_e
|
|||||||
LOG_WARN("not inited", KR(ret));
|
LOG_WARN("not inited", KR(ret));
|
||||||
} else if (OB_FAIL(zone_merge_mgr_->get_snapshot(global_info, infos))) {
|
} else if (OB_FAIL(zone_merge_mgr_->get_snapshot(global_info, infos))) {
|
||||||
LOG_WARN("fail to get zone info", KR(ret));
|
LOG_WARN("fail to get zone info", KR(ret));
|
||||||
|
} else if (global_info.is_merge_error()) {
|
||||||
|
LOG_WARN("should not update global merged scn, cuz is_merge_error is true", K(global_info));
|
||||||
} else {
|
} else {
|
||||||
if (global_info.last_merged_scn_ != global_info.global_broadcast_scn_) {
|
if (global_info.last_merged_scn_ != global_info.global_broadcast_scn_) {
|
||||||
bool merged = true;
|
bool merged = true;
|
||||||
|
|||||||
@ -801,9 +801,12 @@ int ObZoneMergeManagerBase::update_global_merge_info_after_merge(const int64_t e
|
|||||||
const uint64_t meta_tenant_id = gen_meta_tenant_id(tenant_id_);
|
const uint64_t meta_tenant_id = gen_meta_tenant_id(tenant_id_);
|
||||||
if (OB_FAIL(check_inner_stat())) {
|
if (OB_FAIL(check_inner_stat())) {
|
||||||
LOG_WARN("fail to check inner stat", KR(ret), K_(tenant_id));
|
LOG_WARN("fail to check inner stat", KR(ret), K_(tenant_id));
|
||||||
|
} else if (global_merge_info_.is_in_verifying_status()) {
|
||||||
|
LOG_INFO("already in verifying status, no need to update global merge status again", K_(tenant_id),
|
||||||
|
"global merge status", global_merge_info_.merge_status_);
|
||||||
} else if (global_merge_info_.is_merge_error()) {
|
} else if (global_merge_info_.is_merge_error()) {
|
||||||
ret = OB_INNER_STAT_ERROR;
|
ret = OB_INNER_STAT_ERROR;
|
||||||
LOG_WARN("should not continue checking checksum, cuz is_merge_error is true", KR(ret), K_(global_merge_info));
|
LOG_WARN("should not update global merge status, cuz is_merge_error is true", KR(ret), K_(global_merge_info));
|
||||||
} else {
|
} else {
|
||||||
if (OB_FAIL(trans.start(proxy_, meta_tenant_id))) {
|
if (OB_FAIL(trans.start(proxy_, meta_tenant_id))) {
|
||||||
LOG_WARN("fail to start transaction", KR(ret), K_(tenant_id), K(meta_tenant_id));
|
LOG_WARN("fail to start transaction", KR(ret), K_(tenant_id), K(meta_tenant_id));
|
||||||
|
|||||||
@ -88,6 +88,7 @@ private:
|
|||||||
const common::ObIArray<share::ObZoneMergeInfo> &ori_merge_infos,
|
const common::ObIArray<share::ObZoneMergeInfo> &ori_merge_infos,
|
||||||
const common::ObIArray<common::ObZone> &zone_list,
|
const common::ObIArray<common::ObZone> &zone_list,
|
||||||
common::ObIArray<share::ObZoneMergeInfo> &to_insert_infos);
|
common::ObIArray<share::ObZoneMergeInfo> &to_insert_infos);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
common::SpinRWLock lock_;
|
common::SpinRWLock lock_;
|
||||||
static int copy_infos(ObZoneMergeManagerBase &dest, const ObZoneMergeManagerBase &src);
|
static int copy_infos(ObZoneMergeManagerBase &dest, const ObZoneMergeManagerBase &src);
|
||||||
|
|||||||
@ -226,6 +226,11 @@ bool ObGlobalMergeInfo::is_merge_error() const
|
|||||||
return (is_merge_error_ > 0);
|
return (is_merge_error_ > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ObGlobalMergeInfo::is_in_verifying_status() const
|
||||||
|
{
|
||||||
|
return (ObZoneMergeInfo::MERGE_STATUS_VERIFYING == merge_status_);
|
||||||
|
}
|
||||||
|
|
||||||
bool ObGlobalMergeInfo::is_valid() const
|
bool ObGlobalMergeInfo::is_valid() const
|
||||||
{
|
{
|
||||||
bool is_valid = true;
|
bool is_valid = true;
|
||||||
|
|||||||
@ -111,6 +111,7 @@ public:
|
|||||||
bool is_in_merge() const;
|
bool is_in_merge() const;
|
||||||
bool is_valid() const;
|
bool is_valid() const;
|
||||||
bool is_merge_error() const;
|
bool is_merge_error() const;
|
||||||
|
bool is_in_verifying_status() const;
|
||||||
ObGlobalMergeInfo &operator = (const ObGlobalMergeInfo &other) = delete;
|
ObGlobalMergeInfo &operator = (const ObGlobalMergeInfo &other) = delete;
|
||||||
int assign(const ObGlobalMergeInfo &other);
|
int assign(const ObGlobalMergeInfo &other);
|
||||||
// differ from assign, only exclude 'need_update_' copy
|
// differ from assign, only exclude 'need_update_' copy
|
||||||
|
|||||||
Reference in New Issue
Block a user