[FEAT MERGE] transfer_diagnose 422 patch 431
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include "storage/memtable/ob_memtable.h"
|
||||
#include "storage/tablet/ob_tablet_meta.h"
|
||||
#include "storage/tablet/ob_tablet_create_delete_mds_user_data.h"
|
||||
#include "share/ob_storage_ha_diagnose_struct.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -230,6 +231,84 @@ public:
|
||||
ObSqlString comment_;
|
||||
};
|
||||
|
||||
class ObTransferRelatedInfo final
|
||||
{
|
||||
public:
|
||||
ObTransferRelatedInfo();
|
||||
~ObTransferRelatedInfo();
|
||||
int init();
|
||||
bool is_valid() const;
|
||||
void reset();
|
||||
void destroy();
|
||||
int set_info(
|
||||
const share::ObTransferTaskID &task_id,
|
||||
const share::SCN &start_scn);
|
||||
int record_error_diagnose_info_in_replay(
|
||||
const share::ObTransferTaskID &task_id,
|
||||
const share::ObLSID &dest_ls_id,
|
||||
const int result_code,
|
||||
const bool clean_related_info,
|
||||
const share::ObStorageHADiagTaskType type,
|
||||
const share::ObStorageHACostItemName result_msg);
|
||||
int record_error_diagnose_info_in_backfill(
|
||||
const share::SCN &log_sync_scn,
|
||||
const share::ObLSID &dest_ls_id,
|
||||
const int result_code,
|
||||
const ObTabletID &tablet_id,
|
||||
const ObMigrationStatus &migration_status,
|
||||
const share::ObStorageHACostItemName result_msg);
|
||||
|
||||
int record_perf_diagnose_info_in_replay(
|
||||
const share::ObStorageHAPerfDiagParams ¶ms,
|
||||
const int result,
|
||||
const uint64_t timestamp,
|
||||
const int64_t start_ts,
|
||||
const bool is_report);
|
||||
|
||||
int record_perf_diagnose_info_in_backfill(
|
||||
const share::ObStorageHAPerfDiagParams ¶ms,
|
||||
const share::SCN &log_sync_scn,
|
||||
const int result_code,
|
||||
const ObMigrationStatus &migration_status,
|
||||
const uint64_t timestamp,
|
||||
const int64_t start_ts,
|
||||
const bool is_report);
|
||||
int get_related_info_task_id(share::ObTransferTaskID &task_id) const;
|
||||
int reset(const share::ObTransferTaskID &task_id);
|
||||
TO_STRING_KV(K_(task_id), K_(start_scn), K_(start_out_log_replay_num),
|
||||
K_(start_in_log_replay_num), K_(finish_out_log_replay_num), K_(finish_in_log_replay_num));
|
||||
typedef hash::ObHashMap<common::ObTabletID, int64_t, hash::NoPthreadDefendMode> TxBackfillStatMap;
|
||||
|
||||
private:
|
||||
void reset_();
|
||||
int inc_tx_backfill_retry_num_(const ObTabletID &id, int64_t &retry_num);
|
||||
const share::ObTransferTaskID &get_task_id_() const;
|
||||
const share::SCN &get_start_scn_() const;
|
||||
int get_replay_retry_num_(
|
||||
const share::ObStorageHADiagTaskType type, const bool inc_retry_num, int64_t &retry_num);
|
||||
int construct_perf_diag_info_(
|
||||
const share::ObStorageHAPerfDiagParams ¶ms,
|
||||
const uint64_t timestamp,
|
||||
const int64_t retry_num,
|
||||
const share::ObTransferTaskID &task_id,
|
||||
const int result,
|
||||
const int64_t start_ts,
|
||||
const bool is_report);
|
||||
|
||||
private:
|
||||
bool is_inited_;
|
||||
share::ObTransferTaskID task_id_;
|
||||
share::SCN start_scn_;
|
||||
int64_t start_out_log_replay_num_;
|
||||
int64_t start_in_log_replay_num_;
|
||||
int64_t finish_out_log_replay_num_;
|
||||
int64_t finish_in_log_replay_num_;
|
||||
TxBackfillStatMap map_;
|
||||
SpinRWLock lock_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ObTransferRelatedInfo);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user