Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
fix rename
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong committed Nov 2, 2020
1 parent e162d82 commit dd81f3c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/replica/replica_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void replica::on_group_check(const group_check_request &request,
if (request.last_committed_decree > last_committed_decree()) {
_prepare_list->commit(request.last_committed_decree, COMMIT_TO_DECREE_HARD);
}
// the group check may trigger starting/canceling/pausing a split on the secondary.
// the group check may trigger start/finish/cancel/pause a split on the secondary.
_split_mgr->trigger_secondary_parent_split(request, response);
break;
case partition_status::PS_POTENTIAL_SECONDARY:
Expand Down
2 changes: 1 addition & 1 deletion src/replica/split/replica_split_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ void replica_split_manager::child_handle_async_learn_error() // on child partiti
}

// ThreadPool: THREAD_POOL_REPLICATION
void replica_split_manager::secondary_parent_handle_split(
void replica_split_manager::trigger_secondary_parent_split(
const group_check_request &request,
/*out*/ group_check_response &response) // on secondary parent partition
{
Expand Down
4 changes: 2 additions & 2 deletions src/replica/split/replica_split_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ class replica_split_manager : replica_base

// called by `on_group_check` in `replica_check.cpp`
// secondary parent check whether should start or stop split
void secondary_parent_handle_split(const group_check_request &request,
/*out*/ group_check_response &response);
void trigger_secondary_parent_split(const group_check_request &request,
/*out*/ group_check_response &response);

//
// helper functions
Expand Down
12 changes: 6 additions & 6 deletions src/replica/split/test/replica_split_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ class replica_split_test : public replica_test_base
_child_replica->tracker()->wait_outstanding_tasks();
}

group_check_response test_secondary_parent_handle_split(split_status::type meta_split_status,
split_status::type local_split_status)
group_check_response test_trigger_secondary_parent_split(split_status::type meta_split_status,
split_status::type local_split_status)
{
_parent_replica->set_partition_status(partition_status::PS_SECONDARY);
parent_set_split_status(local_split_status);
Expand All @@ -357,7 +357,7 @@ class replica_split_test : public replica_test_base
}

group_check_response resp;
_parent_split_mgr->secondary_parent_handle_split(req, resp);
_parent_split_mgr->trigger_secondary_parent_split(req, resp);
_parent_replica->tracker()->wait_outstanding_tasks();

return resp;
Expand Down Expand Up @@ -735,15 +735,15 @@ TEST_F(replica_split_test, register_child_reply_test)
}
}

// secondary_parent_handle_split unit test
// trigger_secondary_parent_split unit test
TEST_F(replica_split_test, secondary_handle_split_test)
{
generate_child();

// Test cases:
// - secondary parent update partition_count
// TODO(heyuchen): add more cases
struct secondary_parent_handle_split_test
struct trigger_secondary_parent_split_test
{
split_status::type meta_split_status;
split_status::type local_split_status;
Expand All @@ -756,7 +756,7 @@ TEST_F(replica_split_test, secondary_handle_split_test)
mock_parent_split_context(partition_status::PS_SECONDARY);
}
auto resp =
test_secondary_parent_handle_split(test.meta_split_status, test.local_split_status);
test_trigger_secondary_parent_split(test.meta_split_status, test.local_split_status);
ASSERT_EQ(resp.err, ERR_OK);
ASSERT_TRUE(is_parent_not_in_split());
ASSERT_EQ(_parent_split_mgr->get_partition_version(), test.expected_partition_version);
Expand Down

0 comments on commit dd81f3c

Please sign in to comment.