RDKEMW-21242: Detect log rotation via inode tracking to prevent data loss when new log file grows past seek value#393
Merged
Conversation
added 3 commits
July 14, 2026 19:57
…loss when new log file grows past seek value Signed-off-by: yogeswaransky <yogeswaransky@github.com>
…loss when new log file grows past seek value Signed-off-by: yogeswaransky <yogeswaransky@github.com>
…loss when new log file grows past seek value Signed-off-by: yogeswaransky <yogeswaransky@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances DCA log-seek persistence and rotated-log handling by tracking file inodes alongside seek offsets, allowing the collector to detect log rotation reliably even when the new log grows beyond the previously stored seek position (preventing missed data).
Changes:
- Introduces
LogSeekInfo { seekValue, inode }to persist both seek offset and inode per log file. - Updates rotation detection logic in
dca.cto use inode changes (including multi-rotation/intermediate-file handling). - Expands unit tests to cover inode-change and multi-rotation corner cases.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| source/test/dcautils/dcautilTest.cpp | Updates seek-map test fixtures to use LogSeekInfo and adds new rotation corner-case tests. |
| source/dcautil/legacyutils.h | Adds LogSeekInfo definition and required inode type include. |
| source/dcautil/dcautil.c | Updates seek persistence format to store both seek value and inode; adds legacy-read compatibility logic. |
| source/dcautil/dca.c | Implements inode-based rotation detection and multi-rotation behavior in mmap/search path. |
shibu-kv
approved these changes
Jul 14, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.