Skip to content

[Bugfix][TENT] Replace stale buffers when refreshing segment info - #4229

Draft
jacklin78911-collab wants to merge 1 commit into
kvcache-ai:mainfrom
jacklin78911-collab:codex/tent-segment-info-20260919
Draft

jacklin78911-collab wants to merge 1 commit into
kvcache-ai:mainfrom
jacklin78911-collab:codex/tent-segment-info-20260919

Conversation

@jacklin78911-collab

@jacklin78911-collab jacklin78911-collab commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Description

Reusing a SegmentInfo output object with getSegmentInfo() appends new buffers to the previous result. Repeated queries duplicate entries, and a refresh after unregistering a buffer still reports that old address.

Clear the output buffer list after acquiring the current segment descriptor, before filling either the memory or file result. This is a one-line runtime fix. Add a regression to the existing local-memory lifecycle test that queries twice into one object, unregisters the buffer, and queries again.

This fixes output-object reuse, not the remote descriptor cache. The existing TENT CI job already runs this test target. No new state, configuration or test target is needed.

Module

  • Transfer Engine (mooncake-transfer-engine)

Type of Change

  • Bug fix

How Has This Been Tested?

Built from main 2f13d400da4a3eb04d37263742866c1ce555d212, with USE_TENT=ON, USE_CUDA=OFF, and BUILD_UNIT_TESTS=ON.

cmake --build build --target tent_local_memory_lifecycle_test -j4
ctest --test-dir build --output-on-failure -R '^tent_local_memory_lifecycle_test$'

Checklist

  • Full diff and getSegmentInfo callers reviewed in a second pass
  • C++ formatting checked through ./scripts/code_format.sh
  • Scoped pre-commit passes
  • Regression test added
  • Human submitter has reviewed every changed line — draft pending that review

AI Assistance Disclosure

  • AI tools were used

Codex assisted with diagnosis, implementation, regression validation and the second-pass review. This is a draft for human review; no human review is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant