Skip to content

fix(cpp): complete and adopt bounded lru cache - #967

Open
Rayan-and-beyond wants to merge 4 commits into
apache:developfrom
Rayan-and-beyond:fix/943-cpp-lru-cache
Open

Rayan-and-beyond wants to merge 4 commits into
apache:developfrom
Rayan-and-beyond:fix/943-cpp-lru-cache

Conversation

@Rayan-and-beyond

@Rayan-and-beyond Rayan-and-beyond commented Sep 17, 2026 •

Copy link
Copy Markdown

closes #943

this finishes the existing c++ lru cache contract and puts it on the reader device-node path.

  • fixes the broken lookup apis and adds explicit non-copying pointer/reference access
  • documents caller-side synchronization, reference lifetime, elasticity, and unbounded mode
  • removes the stale metadataquerier cache wiring that used std::mutex as the map type
  • replaces the reader's unbounded shared-arena device cache with a 64-entry lru where each entry owns its arena, so eviction can actually reclaim metadata pages
  • adds focused lru behavior coverage plus a reader regression that fills past capacity, reloads an evicted device, and checks reader metadata memory stays flat

validation:

  • 6/6 focused lrucache gtests pass
  • device-node bounded/reload regression passes
  • full TsFile_Test target builds successfully with -j1 on the constrained vm
  • changed production objects compile and libtsfile links with optional codecs/antlr disabled
  • git diff --check clean

@ColinLeeo
ColinLeeo requested a balanced review from Copilot October 10, 2026 01:50

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[Improvement][C++] Complete and adopt the existing LRU cache infrastructure

2 participants