fix: serialize normalized stage lock cleanup - #12
Merged
Conversation
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.
根因
_streaming_stage在释放每个stage owner文件锁后立即删除锁文件。另一个并发流可能已打开同一路径并等待锁:Windows会因打开句柄返回WinError 32,POSIX则可能在同名路径上重新创建不同inode,破坏互斥语义。该竞态使正常的8流capture测试随机进入PAUSED->RESYNC非法迁移,并令默认分支CI失败。修复
.stage-owners/.gc.lock,串行化stale扫描、孤儿owner清理和owner文件删除。验证
normalized_v3.py90.93%,全包87.84%,全部门禁通过。ruff check和ruff format --check通过。不改变任何release tag或发布清单。