restoring replica do not resp reconfirm fetch log req.

This commit is contained in:
hf0
2021-07-22 00:01:05 +08:00
committed by wangzelin.wzl
parent 7fb21bbbe7
commit 69fa727d91
44 changed files with 990 additions and 334 deletions

View File

@ -91,6 +91,10 @@ public:
{
return 3;
}
bool is_single_member_mode() const
{
return false;
}
common::ObReplicaType get_replica_type() const
{
return REPLICA_TYPE_MAX;

View File

@ -203,9 +203,11 @@ public:
UNUSED(sick_child);
return OB_SUCCESS;
}
int process_reject_msg(const common::ObAddr& server, const int32_t msg_type, const int64_t timestamp)
int process_reject_msg(const common::ObAddr &server, const int64_t cluster_id,
const int32_t msg_type, const int64_t timestamp)
{
UNUSED(server);
UNUSED(cluster_id);
UNUSED(msg_type);
UNUSED(timestamp);
return OB_SUCCESS;
@ -477,11 +479,6 @@ public:
UNUSED(role);
return common::OB_SUCCESS;
}
virtual int get_role_for_partition_table(common::ObRole& role) const
{
UNUSED(role);
return common::OB_SUCCESS;
}
virtual int set_archive_restore_state(const int16_t archive_restore_state)
{
UNUSED(archive_restore_state);
@ -512,13 +509,7 @@ public:
UNUSED(leader_epoch);
return common::OB_SUCCESS;
}
virtual int get_role_for_partition_table_unlock(bool& in_changing_leader_windows, int64_t& leader_epoch) const
{
UNUSED(in_changing_leader_windows);
UNUSED(leader_epoch);
return common::OB_SUCCESS;
}
virtual int get_leader_curr_member_list(common::ObMemberList& member_list) const
virtual int get_leader_curr_member_list(common::ObMemberList &member_list) const
{
UNUSED(member_list);
return common::OB_SUCCESS;
@ -1492,6 +1483,15 @@ public:
{
return true;
}
virtual int process_restore_check_req(const common::ObAddr &server,
const int64_t cluster_id,
const ObRestoreCheckType restore_type)
{
UNUSED(server);
UNUSED(cluster_id);
UNUSED(restore_type);
return OB_SUCCESS;
}
virtual int check_and_try_leader_revoke(const election::ObElection::RevokeType& revoke_type)
{
UNUSED(revoke_type);
@ -1501,7 +1501,13 @@ public:
{
return OB_SUCCESS;
}
virtual int process_query_restore_end_id_resp(const common::ObAddr &server,
const uint64_t last_restore_log_id) override
{
UNUSED(server);
UNUSED(last_restore_log_id);
return OB_SUCCESS;
}
private:
common::ObPartitionKey p_k_;
};

View File

@ -79,7 +79,7 @@ public:
{
return 0;
}
virtual int change_leader_to_self_async() override
virtual int change_leader_to_self() override
{
return 0;
}

View File

@ -236,12 +236,7 @@ public:
UNUSED(role);
return OB_NOT_SUPPORTED;
}
int get_role_for_partition_table(common::ObRole& role) const
{
UNUSED(role);
return OB_NOT_SUPPORTED;
}
int get_leader_curr_member_list(common::ObMemberList& member_list) const
int get_leader_curr_member_list(common::ObMemberList &member_list) const
{
UNUSED(member_list);
return OB_NOT_SUPPORTED;

View File

@ -177,8 +177,6 @@ public:
int(const int64_t cmd_type, const ObPartitionKey &pkey));
MOCK_CONST_METHOD2(get_role,
int(const common::ObPartitionKey &pkey, common::ObRole &role));
MOCK_CONST_METHOD2(get_role_for_partition_table,
int(const common::ObPartitionKey &pkey, common::ObRole &role));
MOCK_CONST_METHOD2(get_leader_curr_member_list,
int(const common::ObPartitionKey &pkey, common::ObMemberList &member_list));
MOCK_METHOD2(change_leader,

View File

@ -92,7 +92,6 @@ public:
// leader or follower
MOCK_CONST_METHOD1(get_role, int(common::ObRole& role));
MOCK_CONST_METHOD1(get_role_for_partition_table, int(common::ObRole& role));
MOCK_CONST_METHOD1(get_role_unsafe, int(common::ObRole& role));
MOCK_CONST_METHOD1(get_leader_curr_member_list, int(common::ObMemberList& member_list));
MOCK_CONST_METHOD1(get_leader, int(common::ObAddr& addr));

View File

@ -256,7 +256,6 @@ public:
MOCK_METHOD1(submit_freeze_log_finished, int(const ObPartitionKey& pkey));
MOCK_METHOD1(is_freeze_replay_finished, bool(const ObPartitionKey& pkey));
MOCK_CONST_METHOD2(get_role, int(const common::ObPartitionKey& pkey, common::ObRole& role));
MOCK_CONST_METHOD2(get_role_for_partition_table, int(const common::ObPartitionKey& pkey, common::ObRole& role));
MOCK_CONST_METHOD2(
get_leader_curr_member_list, int(const common::ObPartitionKey& pkey, common::ObMemberList& member_list));
MOCK_CONST_METHOD7(get_curr_leader_and_memberlist,