Skip to content

[#24316] Reduced InstanceCache key warning spam#144

Merged
Danipiza merged 2 commits into
mainfrom
fiw/window_spam
Mar 31, 2026
Merged

[#24316] Reduced InstanceCache key warning spam#144
Danipiza merged 2 commits into
mainfrom
fiw/window_spam

Conversation

@Danipiza

@Danipiza Danipiza commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes repeated FASTDDSSPY_INSTANCECACHE warnings caused by missing key metadata on incoming DynamicTypes, while preserving current key-caching behavior.

Changes

  • Added early short-circuit in InstanceCache::add_or_update_instance:
    • If no key fields are discovered for a topic, skip key serialization.
  • Added one-time warning tracking set in InstanceCache.
  • Improved key field cache behavior:
    • Do not permanently lock an empty key-field cache.
    • Recompute key fields when cached list is empty, allowing recovery if keyed schema arrives later.

Related PR Display the list of keys in a topic

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.73%. Comparing base (b85532f) to head (0c503bb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...dsspy_participants/src/cpp/model/InstanceCache.cpp 50.00% 0 Missing and 4 partials ⚠️

❗ There is a different number of reports uploaded between BASE (b85532f) and HEAD (0c503bb). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (b85532f) HEAD (0c503bb)
11 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
- Coverage   62.27%   56.73%   -5.54%     
==========================================
  Files          29       28       -1     
  Lines        2502     1960     -542     
  Branches     1070      772     -298     
==========================================
- Hits         1558     1112     -446     
+ Misses        382      367      -15     
+ Partials      562      481      -81     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@Danipiza Danipiza changed the title [#24316] Reduced InstanceCache key warning spam in Windows [#24316] Reduced InstanceCache key warning spam Mar 31, 2026

@raulojeda22 raulojeda22 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.

LGTM

@Danipiza Danipiza merged commit 186faa8 into main Mar 31, 2026
18 of 20 checks passed
@Danipiza Danipiza deleted the fiw/window_spam branch March 31, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants