diff --git a/src/replica/replica_check.cpp b/src/replica/replica_check.cpp index 6b5144c0c4..0e8b0b7fb3 100644 --- a/src/replica/replica_check.cpp +++ b/src/replica/replica_check.cpp @@ -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: diff --git a/src/replica/split/replica_split_manager.cpp b/src/replica/split/replica_split_manager.cpp index f4a033036e..0e270f35e2 100644 --- a/src/replica/split/replica_split_manager.cpp +++ b/src/replica/split/replica_split_manager.cpp @@ -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 { diff --git a/src/replica/split/replica_split_manager.h b/src/replica/split/replica_split_manager.h index 2165c32b30..02fbd69350 100644 --- a/src/replica/split/replica_split_manager.h +++ b/src/replica/split/replica_split_manager.h @@ -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 diff --git a/src/replica/split/test/replica_split_test.cpp b/src/replica/split/test/replica_split_test.cpp index ab77f0e094..5e2fa6fdb1 100644 --- a/src/replica/split/test/replica_split_test.cpp +++ b/src/replica/split/test/replica_split_test.cpp @@ -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); @@ -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; @@ -735,7 +735,7 @@ 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(); @@ -743,7 +743,7 @@ TEST_F(replica_split_test, secondary_handle_split_test) // 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; @@ -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);