Skip to content

RDKEMW-21242: Detect log rotation via inode tracking to prevent data loss when new log file grows past seek value#393

Merged
shibu-kv merged 3 commits into
support/1.9from
topic/RDKEMW-21242
Jul 14, 2026
Merged

RDKEMW-21242: Detect log rotation via inode tracking to prevent data loss when new log file grows past seek value#393
shibu-kv merged 3 commits into
support/1.9from
topic/RDKEMW-21242

Conversation

@yogeswaransky

Copy link
Copy Markdown
Contributor

No description provided.

yogeswaransky 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>
Copilot AI review requested due to automatic review settings July 14, 2026 20:01
@yogeswaransky yogeswaransky requested a review from a team as a code owner July 14, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.c to 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.

Comment thread source/dcautil/dcautil.c
Comment thread source/dcautil/dcautil.c
Comment thread source/dcautil/dcautil.c
Comment thread source/dcautil/dca.c
Comment thread source/dcautil/dca.c
Comment thread source/dcautil/dca.c
Comment thread source/test/dcautils/dcautilTest.cpp
Comment thread source/test/dcautils/dcautilTest.cpp
@shibu-kv shibu-kv merged commit 7699489 into support/1.9 Jul 14, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants