fix: tail-sampling 快路径 AND 跨 span 语义破坏(review 反例) - #207
Open
songlonqi-java wants to merge 2 commits into
Open
Conversation
mergePreds 中 flag 谓词(存在性摘要)与任何其它谓词的 AND 一律回退
解压 walk:exists(P1) AND exists(P2) 不等于 exists(P1 AND P2)。反例:
span A {error, 短} + span B {ok, 长},status=error AND duration>N 逐点不
命中,旧快路径会误命中。仅保留三个安全形态:单 flag、parent+duration
同 span pair、纯 duration max、OR 闭包。
补跨 span 反例测试(flag+duration、flag+flag);编译覆盖期望更新
(flag_and_root/flag_and_duration/flag_and_flag 回退)。
测试:go test ./aggregate/ 全量 ok;lint 干净。
改动链路:预编译采样决策计划,复用命中规则元数据,为谓词摘要增加版本,并收紧 zstd 与落盘缓存的资源边界。 风险点:新增 protobuf 可选字段保持向后兼容;解压设置 256MiB 上限;落盘目录改为显式所有权标记,旧格式文件不会被自动清理。 测试:go test -race ./aggregate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Review 指出:谓词快路径把 packet 级存在性摘要做 AND 合并,破坏"同一个 span 满足完整条件"的语义。反例:
条件
status="error" AND duration>N逐点求值不命中任何 span,但旧快路径因PredError=true && MaxSpanDurationUs>N误命中。修复
mergePreds:flag 谓词与任何其它谓词(flag/duration/parent)的 AND 一律回退解压 walk(编译返回 false)。仅保留安全形态:测试
flag_and_root/flag_and_duration/flag_and_flag由可编译改为回退go test ./aggregate/全量 ok;lint 干净