Pull Request已成功合入, 合并人@openeuler-ci-bot
(感谢 Qin Yufei 的贡献)变更摘要
本 PR 为 routing 模块的接口收敛重构:删除仅做枚举转换、无独立语义的历史兼容层 SelectStrategy,保留 DataPlacementPolicy 作为 worker selection 的唯一语义入口,并将该枚举独立到轻量头文件 data_placement_policy.h,同时清理 Routing / WorkerRouter 的 legacy overload 及各调用方、测试中的旧枚举引用。HashRing 计算、worker filter chain、routing refresh 控制链路及数据面选择语义均保持不变。
主要改动
- 删除
SelectStrategy兼容层并迁移枚举:select_strategy.h重命名为data_placement_policy.h,DataPlacementPolicy枚举(PREFERRED_SAME_NODE/REQUIRED_SAME_NODE/PREFERRED_META_OWNER)改为显式uint8_t底层类型并新增#include <cstdint>,SelectStrategy及其HASH_RING_AFFINITY、SAME_NODE_PREFERRED枚举值全部移除。 - 清理
Routing/WorkerRouter的 legacy overload:routing.h/.cpp与worker_router.h/.cpp中删除基于SelectStrategy的SelectWorker/SelectWorkersoverload 及SAME_NODE_PREFERRED → PREFERRED_SAME_NODE的转换逻辑,仅保留DataPlacementPolicy单 key 与 batch 入口。 ExistHandler直接使用新策略枚举:exist_handler.h/.cpp及object_client_impl.cpp的RoutingExistAdapter将IExistRouting::SelectWorkers参数类型由client::SelectStrategy改为client::DataPlacementPolicy,批量选择调用点改用DataPlacementPolicy::PREFERRED_META_OWNER。- 同步 Bazel target 与依赖:routing 与 object_cache 的
BUILD.bazel将:select_strategytarget 收敛为:data_placement_policy,并更新头文件依赖引用。 - 更新测试中的枚举引用:
hash_ring_refresher_test.cpp、worker_router_test.cpp、object_client_impl_exist_test.cpp及 ST 的routing_failure_switch_test.cpp将SelectStrategy::HASH_RING_AFFINITY/SAME_NODE_PREFERRED替换为对应的DataPlacementPolicy枚举值,mock 记录字段同步改为selectedPolicy。


/retest


【OpenYuanRong PROCESS 部署 Actor 冒烟 · PR验证报告】
✅ 总结论:通过
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PR 信息
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
仓库:yuanrong-datasystem
PR 编号:#2117
分支:master
提交:8af190271cf8f32bce01bfd33f3bb2a4a094812c
作者:qinyufei5@huawei.com
操作:merge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
分语言汇总
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
语言 总用例 成功 失败 跳过 通过率
C++ 43 43 0 0 100.0%
Python 90 90 0 0 100.0%
Java 26 26 0 0 100.0%
合计 159 159 0 0 100.0%
Jenkins 构建: http://jenkins.openyuanrong.com/job/openyuanrong/job/OpenYR_Actor_Smoke_Process_X86/612/


【OpenYuanRong K8S 部署 Actor 冒烟 · PR验证报告】
❌ 总结论:未通过(成功率低于10%: Java(0.0%))
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PR 信息
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
仓库:yuanrong-datasystem
PR 编号:#2117
分支:master
提交:8af190271cf8f32bce01bfd33f3bb2a4a094812c
作者:qinyufei5@huawei.com
操作:merge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
分语言汇总
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
语言 总用例 成功 失败 跳过 通过率
C++ 39 11 28 0 28.2%
Python 54 49 5 0 90.7%
Java 31 0 31 0 0.0%
合计 124 60 64 0 48.4%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
失败类型分布
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
测试用例问题:0 例
代码BUG:64 例
环境问题:0 例
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
代码BUG失败用例
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
【C++】共 28 例:
- GetEnvTest.cpp_yr_workdir_instanceid_1
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - GetEnvTest.cpp_yr_workdir_instanceid_4
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - GetEnvTest.cpp_instance_dir_disk_quota_1
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - GetEnvTest.cpp_instance_dir_disk_quota_2
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - WaitTest.cpp_wait_partial_call_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - WaitTest.cpp_wait_call_between_functions
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - InvokeTest.cpp_invoke_oncloud_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - InvokeTest.cpp_invoke_onclond_multilevel_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - TenantIdTest.cpp_tenantid_128_size
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AddAffinityTest.cpp_task_label_rpa_leo_2
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AddAffinityTest.cpp_actor_label_rpa_lnio
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong-functionsystem - AddAffinityTest.cpp_actor_label_rraaa_lio
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong-functionsystem - AntiOtherLabelsTest.cpp_task_antiotherlabels_label_rpa_leo_2
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AntiOtherLabelsTest.cpp_actor_antiotherlabels_label_rpa_lnio
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong-functionsystem - AntiOtherLabelsTest.cpp_actor_antiotherlabels_label_rraaa_lio
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong-functionsystem - InstanceNodeAffinityTest.cpp_instance_node_affinity_required
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - MaxTaskInstancesTest.cpp_instances_largethan_configuration1
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - TeminateTest.cpp_teminate_uncloud
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - TeminateTest.cpp_teminate_oncloud
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - StatefulTest.cpp_stateful_invoke_modifystate_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - StatefulTest.cpp_stateful_invoke_acallb_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AsyncTerminateTest.cpp_asyncterminate_uncloud_get
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AsyncTerminateTest.cpp_syncterminate_uncloud_get
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - NamedInstanceTest.cpp_get_named_instance_001
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - ShutdownHandlerTest.cpp_shutdownhandler_001
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - SaveStateTest.cpp_savestate_001
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AlwaysLocalModeTest.cpp_task_alwayslocalmode_true_1
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - StreamTest.cpp_stream_cloud_003
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong
【Python】共 5 例:
- test_other.py::test_passing_args_by_value_outer
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - test_yr_resource.py::test_yr_resource_003
错误:AttributeError: Can't get attribute '_function_setstate' on <module 'cloudpickle.cloudpickle' from '/opt/buildtools/python3.11/lib/python3.11/site-...
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - test_yr_api.py::test_passing_args_by_value_outer_api
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - test_config_init.py::test_invoke_remote
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - test_config_init.py::test_cloud_recycle_time
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong
【Java】共 31 例:
- GangScheduleTest.test_gang_schedule_cloud_003
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - GracefulShutdownTest.test_graceful_shutdown_001
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - KVTest.test_kv_set_get_mutil_notexist_undercloude
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - KVTest.test_kv_get_single_key_timeout_forever1
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - KVTest.test_kv_set_get_del_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - KVTest.test_kv_set_get_oncloud
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - KVTest.test_java_getwithparam_003
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - ObjectStoreTest.test_get_remote_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong-datasystem - AntiothersAffinityTest.test_antiothers_actor_label_rpa_leo_02
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - GroupPenetrationTest.test_init_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - PutGetTest.test_init_put_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - PutGetTest.test_finalize_get_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - PutGetTest.test_put_get_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - PutGetTest.test_put_invoke_multi_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - MultiThreadingTest.test_invoke_concurrency_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - AffinityTest.test_actor_label_rpa_leo_2
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - InstanceTest.test_create_and_call_instance
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - BaseTest.test_init_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - BaseTest.test_actor_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - BaseTest.test_task_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - BaseTest.test_cloud_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - BaseTest.test_nested_function_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - BaseTest.test_return_empty_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - InvokeTest.test_invoke_multiple_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - InvokeTest.test_invoke_remote_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - InvokeTest.test_cloud_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - SaveStateTest.test_save_load_state_001
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - FinalizeTest.test_finalize_invoke_smoke
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - ChangeContextTest.test_change_context_003
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - ChangeContextTest.test_change_context_010
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong - RequiredPriorityTest.test_actor_requiredpriority_001
根因:LLM 根因分析未执行或失败,请结合失败日志人工补全
⚠️ 待手动提交Issue → openeuler/yuanrong
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
成功率异常提醒
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚨 【测试人员 & 开发人员请排查】
以下测试模块成功率低于10%:
- Java: 成功率 0.0% (0成功/31失败/0跳过)
请检查:
- 测试环境配置是否正常
- 测试数据/依赖是否完整
- 代码是否有环境兼容性问题
- 服务/中间件是否正常运行
Jenkins 构建: http://jenkins.openyuanrong.com/job/openyuanrong/job/k8s-daily-pr/62/


这是什么类型的PR?
/kind cleanup
1. 问题背景 / 问题现象
关联问题 / Related issue:
现象 / Symptom:
SelectStrategy与DataPlacementPolicy相关入口,但SelectStrategy只是 legacy compatibility wrapper,实际最终仍映射到DataPlacementPolicy。根因 / Root cause:
2. 修改方案 / 解决方案
核心方案 / Core solution:
DataPlacementPolicy的两个正式入口:single-keySelectWorker与 batchSelectWorkers。SelectStrategyoverload / wrapper,并将调用点统一迁移到DataPlacementPolicy。DataPlacementPolicy放入独立头文件,调用方无需为策略枚举引入完整 routing declaration。关键设计决策 / Key design decisions:
SelectStrategy是历史兼容包装;HashRing refresh 与 metadata-owner selection behavior 保持不变。HashRingRefresher、WorkerRouterring view、filter chain、same-node preference、exclude reroute 或 fallback algorithm。3. 修改文件清单
src/datasystem/client/routing/data_placement_policy.hDataPlacementPolicyenum 头文件。src/datasystem/client/routing/routing.hSelectStrategyoverload,只保留正式 policy API。src/datasystem/client/routing/routing.cppSelectStrategy到DataPlacementPolicy的中转实现。src/datasystem/client/routing/worker_router.hsrc/datasystem/client/routing/worker_router.cppsrc/datasystem/client/object_cache/exist_handler.*DataPlacementPolicy。src/datasystem/client/object_cache/object_client_impl.cppDataPlacementPolicy。tests/ut/client/**、tests/st/client/**4. 验证计划
5. 验证结果
80/80 passed。RoutingFailureSwitchTest.StateAndDisconnectFiltersConvergepassed。8af19027。6. 影响范围
7. 风险与边界
SelectStrategyoverload,需要迁移到DataPlacementPolicy。8. 自检清单