Skip to content

TCXB7-7251: Fix marker loss on in-place log truncation - #445

Merged
shibu-kv merged 1 commit into
developfrom
topic/TCXB7-7251_truncated_log_develop
Oct 1, 2026
Merged

shibu-kv merged 1 commit into
developfrom
topic/TCXB7-7251_truncated_log_develop

Conversation

@tabbas651

Copy link
Copy Markdown
Contributor

Log upload backs up and truncates monitored files (e.g. wifihealth.txt, PARODUSlog.txt) in place without always producing a rotated .1 file. The stored seek value from the previous collection cycle then points past the truncated file's new size. getFileDeltaInMemMapAndSearch() previously treated this the same as an unrecoverable rotation with no backup and returned NULL, silently dropping every marker sourced from that file for one report cycle (e.g. Total_5G_clients_split, SYS_INFO_LowQosEvntUpload).

Add a truncated check (seek_value > sb.st_size) and, when no rotated file is available, read the entire current file from offset 0 instead of skipping the collection, so markers are captured in the same cycle immediately following log upload.

Log upload backs up and truncates monitored files (e.g. wifihealth.txt,
PARODUSlog.txt) in place without always producing a rotated .1 file. The
stored seek value from the previous collection cycle then points past the
truncated file's new size. getFileDeltaInMemMapAndSearch() previously
treated this the same as an unrecoverable rotation with no backup and
returned NULL, silently dropping every marker sourced from that file for
one report cycle (e.g. Total_5G_clients_split, SYS_INFO_LowQosEvntUpload).

Add a truncated check (seek_value > sb.st_size) and, when no rotated file
is available, read the entire current file from offset 0 instead of
skipping the collection, so markers are captured in the same cycle
immediately following log upload.
@tabbas651
tabbas651 requested a review from a team as a code owner September 30, 2026 22:30
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                                         |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/mnt/L1_CONTAINER_SHARED_VOLUME/source/]
bulkdata/datamodel.c                      |72.5%    218|88.9%     9|    -      0
bulkdata/profile.c                        |27.0%   1130|73.5%    34|    -      0
bulkdata/profilexconf.c                   |48.3%    528|85.0%    20|    -      0
bulkdata/reportprofiles.c                 |57.5%    586| 100%    27|    -      0
bulkdata/t2eventreceiver.c                |64.1%    301| 100%    10|    -      0
bulkdata/t2markers.c                      |80.5%    169|83.3%    12|    -      0
ccspinterface/busInterface.c              |86.8%     53|85.7%     7|    -      0
ccspinterface/rbusInterface.c             |74.3%    946|97.2%    36|    -      0
commonlib/telemetry_busmessage_sender.c   |40.4%    396|84.2%    19|    -      0
dcautil/dca.c                             |72.8%    684| 100%    20|    -      0
dcautil/dcaproc.c                         |84.3%    230| 100%     7|    -      0
dcautil/dcautil.c                         |78.9%    185| 100%     6|    -      0
dcautil/legacyutils.c                     |79.0%    105| 100%     7|    -      0
privacycontrol/rdkservices_privacyutils.c | 100%     11| 100%     2|    -      0
protocol/http/curlinterface.c             | 100%     24| 100%     3|    -      0
protocol/http/multicurlinterface.c        |59.7%    375|80.0%    10|    -      0
protocol/rbusMethod/rbusmethodinterface.c |60.0%    105|50.0%     6|    -      0
reportgen/reportgen.c                     |55.7%    924| 100%    21|    -      0
scheduler/scheduler.c                     |70.2%    413| 100%    13|    -      0
t2parser/t2parser.c                       |59.4%   1939|88.5%    26|    -      0
t2parser/t2parserxconf.c                  |89.7%    195| 100%     3|    -      0
utils/persistence.c                       |78.7%    253| 100%    10|    -      0
utils/t2MtlsUtils.c                       |82.6%     46|75.0%     4|    -      0
utils/t2collection.c                      |89.6%    201| 100%    18|    -      0
utils/t2common.c                          |63.8%    185|73.3%    15|    -      0
utils/t2log_wrapper.c                     |69.2%     26|50.0%     2|    -      0
utils/vector.c                            |94.9%     79| 100%     8|    -      0
================================================================================
                                   Total:|61.1%  10307|90.4%   355|    -      0

@shibu-kv
shibu-kv merged commit 8a88c84 into develop Oct 1, 2026
14 of 15 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 1, 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.

2 participants