Repository navigation
[Bugfix][TransferEngine] Initialize descriptor fields compared on refresh - #63
Open
Connor-Matthew wants to merge 2 commits into
Open
Connor-Matthew wants to merge 2 commits into
Connor-Matthew wants to merge 2 commits into
Conversation
…resh decodeSegmentDesc() leaves BufferDesc::offset unset for non-CXL segments and DeviceDesc::lid unset for ub segments, so a decoded SegmentDesc holds indeterminate values in members that SegmentDesc::operator== reads. Two decodes of the same published JSON can then disagree, and the strict same-version check in refreshCachedSegment() rejects an unchanged descriptor as a conflict (ERR_METADATA). The nightly TransferMetadataStaleSegmentInvalidationTest.StrictRefresh* cases fail under ASan for this reason. Default both fields to zero; their decode paths still set them where they carry meaning. Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
Keep absent protocol-specific fields deterministic during metadata refresh. Cover refreshing an unchanged CXL descriptor without a buffer address. Signed-off-by: Connor-Matthew <60215777+Connor-Matthew@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SegmentDesc::operator==drives the same-version "conflicting metadata" check insyncSegmentCache()/refreshCachedSegment().decodeSegmentDesc()never assignsBufferDesc::offsetfor non-CXL segments (norDeviceDesc::lidforubsegments), so each decode leaves those members indeterminate. Two decodes of the same published JSON can then compare unequal, and a strict refresh of an unchanged descriptor is rejected withERR_METADATA(-200). This breaks therefresh_sessionpath added in kvcache-ai#5194 and turns nightly-coverage red onTransferMetadataStaleSegmentInvalidationTest.StrictRefresh*under ASan.Default both scalars to zero. The CXL decode path still assigns
offsetexplicitly and the RDMA/ascend paths still assignlid, so published content is unchanged.Relevant run: nightly
Nightly Build & Test46163419233 (nightly-coverage, shad936855e).Suggested Merge Priority
Module
mooncake-transfer-engine)Type of Change
How Has This Been Tested?
Built
transfer_metadata_testwith the nightly sanitizer configuration(
-DENABLE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug) and ran the hardware-free suites:StrictRefresh*cases fail withRejecting conflicting segment metadata with unchanged versionandrefreshCachedSegment() == -200, reproducing the nightly failure.buffers[0].offsetdiffers between the two decodes (garbage values such as35184346872120vs187650824490924); every other compared field matches.(
[ PASSED ] 12 tests.).The remaining tests in
transfer_metadata_testneed an etcd metadata server, sothe full binary was not run locally.
Test results:
Checklist
Signed-off-bytrailer certifying the DCO./scripts/code_format.shAI Assistance Disclosure
AI tools were used to help locate the failing field and draft the two-line
initializer change; the submitter reviewed the diff and ran the verification
above end to end.