Skip to content

冗余索引规则优化 #3020

@LordofAvernus

Description

@LordofAvernus

版本信息(Version)

4.2504.0-pre2

问题描述(Describe)

冗余索引规则的审核结果的排序不固定

截图或日志(Log)

Image

Image

如何复现(To Reproduce)

重复执行单测能够复现

问题原因

代码中使用sort.Slice方法 对审核的结果做 根据Level大小的排序。Level相同的时候没有做出额外的判断

  • Go 的文档明确指出:

sort.Slice sorts the provided slice using the provided less function. The sort is not guaranteed to be stable.

解决方案

使用sort.SliceStable来稳定相同Levle结果的相对位置

变更影响面

受影响的模块或功能

外部引用的潜在问题或风险

版本兼容性

测试建议

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions