add tablet replica checksum error info into __all_rootservice_event_history

This commit is contained in:
LiefB
2023-07-12 05:18:09 +00:00
committed by ob-robot
parent 1069c1a6ff
commit e14bf1064c
2 changed files with 9 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include "rootserver/freeze/ob_major_freeze_util.h"
#include "rootserver/freeze/ob_major_merge_progress_checker.h"
#include "rootserver/ob_root_utils.h"
#include "rootserver/ob_rs_event_history_table_operator.h"
#include "lib/mysqlclient/ob_mysql_proxy.h"
#include "lib/mysqlclient/ob_isql_client.h"
#include "lib/time/ob_time_utility.h"
@ -436,6 +437,9 @@ int ObTabletChecksumValidator::validate_tablet_replica_checksum(
} else if (OB_CHECKSUM_ERROR == ret) {
LOG_DBA_ERROR(OB_CHECKSUM_ERROR, "msg", "ERROR! ERROR! ERROR! checksum error in major "
"tablet_replica_checksum", KR(ret), K_(tenant_id), K(frozen_scn), "pair_cnt", pairs.count());
if (TC_REACH_TIME_INTERVAL(6 * 3600 * 1000 * 1000)) { // record every 6h
ROOTSERVICE_EVENT_ADD("daily_merge", "checksum_error", K_(tenant_id), K(table_id));
}
} else {
LOG_WARN("fail to check major tablet_replica checksum", KR(ret), K_(tenant_id),
K(frozen_scn), K(table_id));

View File

@ -15,6 +15,7 @@
#include "rootserver/freeze/ob_major_merge_progress_checker.h"
#include "rootserver/freeze/ob_zone_merge_manager.h"
#include "rootserver/freeze/ob_major_freeze_util.h"
#include "rootserver/ob_rs_event_history_table_operator.h"
#include "share/schema/ob_schema_getter_guard.h"
#include "share/tablet/ob_tablet_table_operator.h"
#include "share/tablet/ob_tablet_table_iterator.h"
@ -463,6 +464,10 @@ int ObMajorMergeProgressChecker::check_tablet_compaction_scn(
if (ObTabletReplica::ScnStatus::SCN_STATUS_ERROR == r->get_status()) {
ret = OB_CHECKSUM_ERROR;
LOG_ERROR("ERROR! ERROR! ERROR! find error status tablet replica", KR(ret), K(tablet_info));
if (TC_REACH_TIME_INTERVAL(6 * 3600 * 1000 * 1000)) { // record every 6h
ROOTSERVICE_EVENT_ADD("daily_merge", "checksum_error", "tenant_id", r->get_tenant_id(),
"ls_id", r->get_ls_id().id(), "tablet_id", r->get_tablet_id().id());
}
}
}
}