fix(logging): prevent dropped frames in multi-device logs - #420
Merged
Conversation
- route selected devices through a single file transport - serialize BLF containers and keep objects intact - match Vector padding and add multi-device regression coverage
crazy0104
marked this pull request as ready for review
August 1, 2026 18:30
|
请问上面的修复也能解决单通道记录的log丢帧的问题吗?我尝试使用一个通道记录数据,也会存在recv cnt和发送端一致,但是log中丢帧的情况 |
Contributor
Author
这个PR优化了下多通道Log的相关实现,单通道应该也有改善,使用过程还是有问题可以单独提一个issue.。 |
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.
Summary
Root cause
Each device logger invoked the file transport factory independently. With multiple CAN channels selected, this created multiple writers for the same ASC/BLF path. Since each writer opened the file for writing, they could truncate or overwrite one another, even though the per-device statistics remained correct.
BLF logging also sliced the uncompressed buffer at the container limit without respecting object boundaries, and compression jobs could finish out of order. The BLF reader additionally used an incompatible padding calculation, which could stop parsing at a container boundary.
Validation
npx vitest --config vitest.config.ts run test/transport/deviceLog.test.ts test/replay/replay.spec.ts— 12 tests passednpm run typecheckpython-canFixes #417