forked from lei.chen/myxce
fix(apiserver): job_status notnull filter matches every job (bug-1504)
`xcecli jobs list -a` returned "no job found" even when jobs existed. FilterRows routes every condition on a bitmask field (job_status / host_status) to MatchesBitmaskCondition, which only implemented OpEQ/OpNE bitmask semantics — the `-a` filter compiles to `job_status notnull` (OpNOTNULL), which fell through to `return false` and filtered out every job. (The default list's `notin(EXIT,DONE)` is compiled to OpEQ(mask), so it was unaffected.) Add OpISNULL/OpNOTNULL branches to MatchesBitmaskCondition that test the raw field value. New query_test.go: 3 regression tests (notnull matches all, null matches none, bitmask notin path unaffected), RED->GREEN. Verified live: `xcecli jobs list -a` now lists all jobs including DONE. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
60ebf4af72
commit
c630809116
4 changed files with 116 additions and 1 deletions
|
|
@ -14797,5 +14797,24 @@
|
|||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-05"
|
||||
},
|
||||
{
|
||||
"id": "bug-1504",
|
||||
"timestamp": "2026-08-05",
|
||||
"error_message": "xcecli jobs list -a \u8fd4\u56de \"no job found\"\uff08\u5e94\u663e\u793a\u5168\u90e8\u4f5c\u4e1a\u542b\u5df2\u5b8c\u6210\uff09\uff1b\u9ed8\u8ba4\u5217\u8868\u53ea\u663e\u793a RUN \u4f5c\u4e1a",
|
||||
"file": "src/frontend/apiserver/store/query.go (MatchesBitmaskCondition) + query_test.go",
|
||||
"root_cause": "FilterRows \u628a bitmask \u5b57\u6bb5 (job_status/host_status) \u7684\u6240\u6709\u6761\u4ef6\u90fd\u8def\u7531\u5230 MatchesBitmaskCondition\uff0c\u4f46\u8be5\u51fd\u6570\u53ea\u5b9e\u73b0 OpEQ/OpNE \u7684\u4f4d\u63a9\u7801\u8bed\u4e49\u3002 \u751f\u6210\u7684 (OpNOTNULL) \u843d\u5165 -> \u6240\u6709\u4f5c\u4e1a\u88ab\u8fc7\u6ee4\u3002\u9ed8\u8ba4\u5217\u8868\u7684 notin(EXIT,DONE) \u88ab\u7f16\u8bd1\u6210 OpEQ(mask) \u6240\u4ee5\u4e0d\u53d7\u5f71\u54cd\u3002",
|
||||
"fix": "MatchesBitmaskCondition \u589e\u52a0 OpISNULL/OpNOTNULL \u5206\u652f\uff0c\u76f4\u63a5\u5728\u539f\u59cb\u5b57\u6bb5\u503c\u4e0a\u5224\u7a7a\u3002\u65b0\u589e query_test.go 3 \u4e2a\u56de\u5f52\u6d4b\u8bd5\uff08notnull \u5168\u5339\u914d / null \u7a7a\u5339\u914d / notin \u4f4d\u63a9\u7801\u8def\u5f84\u4e0d\u56de\u5f52\uff09\uff0cRED->GREEN \u9a8c\u8bc1\u3002",
|
||||
"tags": [
|
||||
"apiserver",
|
||||
"xcecli",
|
||||
"jobs-list",
|
||||
"filter",
|
||||
"bitmask",
|
||||
"notnull"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-05"
|
||||
}
|
||||
]
|
||||
|
|
@ -7370,3 +7370,4 @@
|
|||
| 05:50 | Session end: 9 writes across 5 files (frpcdbg_mon.sh, frpc_prod.toml, frpc_mon.sh, frpc_watchdog.sh, frpc-watchdog.sh) | 2 reads | ~2219 tok |
|
||||
| 09:39 | 修复 controller 反复崩溃 bug-1502: persist_job_hook_fun 把 RUSAGE_UPDATE hook 的第2参 (xce_job_rusages_t*) 当 job_t* 用, 读 offset 56 越界 56字节结构 -> ASAN heap-buffer-overflow. 加专用 case 从 jobmgr 取当前 state | src/controller/persist.c, testsuite/test_persist_hooks.c | RED(旧代码 stack-buffer-overflow)/GREEN(修复后 PASS), 全套458测试通过 | ~350 |
|
||||
| 01:08 | 验证完成: bug-1502(controller ASAN崩溃)修复生产生效(sleep 666跑满666秒, controller 0崩溃); 作业PENDING根因=配置正确但scheduler先于worker join拿不到slots(操作时序, bug-1503); 干净controller部署, 集群全链路(apiserver提交->scheduler->controller->worker)冒烟通过 | persist.c, sched.c, worker.c | 验证通过 | ~300 |
|
||||
| 01:42 | 修复 bug-1504: xcecli jobs list -a 返回空, 因 FilterRows 把 job_status notnull 路由到 MatchesBitmaskCondition(仅实现OpEQ/OpNE) -> 全过滤. 加 OpISNULL/OpNOTNULL 分支 + 3回归测试, 部署后 -a 正常显示全部作业 | src/frontend/apiserver/store/query.go + query_test.go | RED->GREEN, 生产验证 -a 列出全部 | ~250 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue