[scn] fix failure of mittest after refresh feature scn
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "share/schema/ob_table_schema.h"
|
||||
#include "share/tablet/ob_tablet_info.h"
|
||||
#include "share/ob_column_checksum_error_operator.h"
|
||||
#include "logservice/palf/scn.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -30,7 +31,6 @@ namespace common
|
||||
class ObISQLClient;
|
||||
class ObAddr;
|
||||
class ObTabletID;
|
||||
class ObMySQLTransaction;
|
||||
namespace sqlclient
|
||||
{
|
||||
class ObMySQLResult;
|
||||
@ -38,7 +38,6 @@ class ObMySQLResult;
|
||||
}
|
||||
namespace share
|
||||
{
|
||||
class ObTabletReplica;
|
||||
|
||||
struct ObTabletReplicaReportColumnMeta
|
||||
{
|
||||
@ -85,7 +84,7 @@ public:
|
||||
ObTabletReplicaChecksumItem &operator =(const ObTabletReplicaChecksumItem &other);
|
||||
|
||||
TO_STRING_KV(K_(tenant_id), K_(ls_id), K_(tablet_id), K_(server), K_(row_count),
|
||||
K_(snapshot_version), K_(data_checksum), K_(column_meta));
|
||||
K_(compaction_scn), K_(data_checksum), K_(column_meta));
|
||||
|
||||
public:
|
||||
uint64_t tenant_id_;
|
||||
@ -93,7 +92,7 @@ public:
|
||||
common::ObTabletID tablet_id_;
|
||||
common::ObAddr server_;
|
||||
int64_t row_count_;
|
||||
int64_t snapshot_version_;
|
||||
palf::SCN compaction_scn_;
|
||||
int64_t data_checksum_;
|
||||
ObTabletReplicaReportColumnMeta column_meta_;
|
||||
};
|
||||
@ -106,7 +105,7 @@ public:
|
||||
const uint64_t tenant_id,
|
||||
const ObTabletLSPair &start_pair,
|
||||
const int64_t batch_cnt,
|
||||
const int64_t snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::ObISQLClient &sql_proxy,
|
||||
common::ObIArray<ObTabletReplicaChecksumItem> &items);
|
||||
static int batch_get(
|
||||
@ -119,26 +118,25 @@ public:
|
||||
const common::ObSqlString &sql,
|
||||
common::ObISQLClient &sql_proxy,
|
||||
common::ObIArray<ObTabletReplicaChecksumItem> &items);
|
||||
static int batch_update_with_trans(
|
||||
common::ObMySQLTransaction &trans,
|
||||
static int batch_insert(
|
||||
const uint64_t tenant_id,
|
||||
const common::ObIArray<ObTabletReplicaChecksumItem> &item);
|
||||
static int batch_remove_with_trans(
|
||||
common::ObMySQLTransaction &trans,
|
||||
const common::ObIArray<ObTabletReplicaChecksumItem> &items,
|
||||
common::ObISQLClient &sql_proxy);
|
||||
static int batch_update(
|
||||
const uint64_t tenant_id,
|
||||
const common::ObIArray<share::ObTabletReplica> &tablet_replicas);
|
||||
static int remove_residual_checksum(
|
||||
common::ObISQLClient &sql_client,
|
||||
const common::ObIArray<ObTabletReplicaChecksumItem> &items,
|
||||
common::ObISQLClient &sql_proxy);
|
||||
static int batch_remove(
|
||||
const uint64_t tenant_id,
|
||||
const ObAddr &server,
|
||||
const int64_t limit,
|
||||
int64_t &affected_rows);
|
||||
const common::ObIArray<share::ObLSID> &ls_ids,
|
||||
const common::ObIArray<common::ObTabletID> &tablet_ids,
|
||||
common::ObISQLClient &sql_proxy);
|
||||
|
||||
static int check_column_checksum(
|
||||
const uint64_t tenant_id,
|
||||
const schema::ObTableSchema &data_table_schema,
|
||||
const schema::ObTableSchema &index_table_schema,
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::ObMySQLProxy &sql_proxy);
|
||||
|
||||
static int set_column_meta_with_hex_str(
|
||||
@ -156,10 +154,10 @@ public:
|
||||
common::ObString &column_meta_hex_str);
|
||||
|
||||
private:
|
||||
static int batch_insert_or_update_with_trans_(
|
||||
static int batch_insert_or_update_(
|
||||
const uint64_t tenant_id,
|
||||
const common::ObIArray<ObTabletReplicaChecksumItem> &items,
|
||||
common::ObMySQLTransaction &trans,
|
||||
common::ObISQLClient &sql_proxy,
|
||||
const bool is_update);
|
||||
|
||||
static int inner_batch_insert_or_update_by_sql_(
|
||||
@ -170,13 +168,6 @@ private:
|
||||
common::ObISQLClient &sql_client,
|
||||
const bool is_update);
|
||||
|
||||
static int inner_batch_remove_by_sql_(
|
||||
const uint64_t tenant_id,
|
||||
const common::ObIArray<share::ObTabletReplica> &tablet_replicas,
|
||||
const int64_t start_idx,
|
||||
const int64_t end_idx,
|
||||
common::ObMySQLTransaction &trans);
|
||||
|
||||
static int inner_batch_get_by_sql_(
|
||||
const uint64_t tenant_id,
|
||||
const common::ObSqlString &sql,
|
||||
@ -187,7 +178,7 @@ private:
|
||||
const uint64_t tenant_id,
|
||||
const ObTabletLSPair &start_pair,
|
||||
const int64_t batch_cnt,
|
||||
const int64_t snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::ObSqlString &sql);
|
||||
|
||||
static int construct_batch_get_sql_str_(
|
||||
@ -213,21 +204,21 @@ private:
|
||||
const uint64_t tenant_id,
|
||||
const schema::ObTableSchema &data_table_schema,
|
||||
const schema::ObTableSchema &index_table_schema,
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::ObMySQLProxy &sql_proxy);
|
||||
|
||||
static int check_local_index_column_checksum(
|
||||
const uint64_t tenant_id,
|
||||
const schema::ObTableSchema &data_table_schema,
|
||||
const schema::ObTableSchema &index_table_schema,
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::ObMySQLProxy &sql_proxy);
|
||||
|
||||
// get column checksum_sum from items and store result in map
|
||||
// KV of @column_ckm_sum_map is: <column_id, column_checksum_sum>
|
||||
static int get_column_checksum_sum_map_(
|
||||
const schema::ObTableSchema &table_schema,
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::hash::ObHashMap<int64_t, int64_t> &column_ckm_sum_map,
|
||||
const common::ObIArray<ObTabletReplicaChecksumItem> &items);
|
||||
|
||||
@ -235,7 +226,7 @@ private:
|
||||
// KV of @column_ckm_map is: <column_id, column_checksum>
|
||||
static int get_column_checksum_map_(
|
||||
const schema::ObTableSchema &table_schema,
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
common::hash::ObHashMap<int64_t, int64_t> &column_ckm_map,
|
||||
const ObTabletReplicaChecksumItem &item);
|
||||
|
||||
@ -249,7 +240,7 @@ private:
|
||||
static int find_checksum_item_by_id_(
|
||||
const common::ObTabletID &tablet_id,
|
||||
common::ObIArray<ObTabletReplicaChecksumItem> &items,
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
int64_t &idx);
|
||||
|
||||
static int get_table_all_tablet_id_(
|
||||
@ -257,7 +248,7 @@ private:
|
||||
common::ObIArray<common::ObTabletID> &schema_tablet_ids);
|
||||
|
||||
static int need_verify_checksum_(
|
||||
const int64_t global_snapshot_version,
|
||||
const palf::SCN &compaction_scn,
|
||||
bool &need_verify,
|
||||
common::ObIArray<common::ObTabletID> &schema_tablet_ids,
|
||||
common::ObIArray<ObTabletReplicaChecksumItem> &items);
|
||||
|
||||
Reference in New Issue
Block a user