已合并
bugfix:统一db问题修正 #487
wangzixuan创建于 15 天前
bugfix:统一db问题修正 #487
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 wangzixuan 的贡献)15 天前 创建了 pull request,commit 04534404
atomgit-bot
15 天前 评论:
15 天前 评论:
变更摘要
本 PR 为 bugfix,修正 DPUTask 表写入时 globalTid 的生成逻辑:原实现直接将 threadId 作为 globalTid,未遵循统一的 globalTid 呈现规则。改动后统一按「高位 pid、低位 tid」计算 globalTid,即由 pid 与 threadId 拼接(Utils::Contact(pid, data.threadId))得到,并相应扩大该字段的数据类型。核心逻辑位于 analysis/csrc/application/database/db_assembler.cpp 的 SaveDPUData 函数,UT 用例在 db_assembler_utest.cpp 中同步更新。
主要改动
globalTid计算规则修正:在SaveDPUData中新增通过Environment::Context::GetInstance().GetPidFromInfoJson(HOST_ID, profPath)获取pid,并将入表字段由data.threadId改为Utils::Contact(pid, data.threadId)(高位 pid、低位 tid)拼接到 64 位globalTid。- 字段类型扩展:
DPUTaskFormat元组中对应globalTid列的元素类型由uint32_t调整为uint64_t,以容纳拼接后的 64 位取值。 - UT 用例同步更新:
db_assembler_utest.cpp中TestRunSaveDPUDataShouldReturnTrueWhenRunSuccess与TestRunSaveDPUDataShouldReturnFalseWhenReserveFailed的DPUDataFormat类型声明同步改为uint64_t,断言值由123/124更新为Contact(1, 123)/Contact(1, 124)。


不准确?
AtlasAccount
15 天前 评论:
15 天前 评论:
atomgit-bot
15 天前 评论:
15 天前 评论:
15 天前 添加了label:ascend-cla/yes
此处折叠了172条消息 查看更多
panyj1993
10 天前 评论:
10 天前 评论:
/approve


10 天前 添加了label:approved
10 天前 合入了pull request
ascend-robot
10 天前 评论:
10 天前 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


ascend-robot
10 天前 评论:
10 天前 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


PR 合入模板
注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。
1. 修改描述
2. 功能验证
3. 分支合并要求
3. 代码检视
要求:
检视意见数:____ 条 (请填写本次检视的意见总数,用于commit合入前审视)
4. 安全自检
Python、C++
C++
5. 变更知会