2b GC follow-on: drop dead CpSharedL2NodeMetadata.{committed, committed_payload_layers}
Tier-2-GC follow-on (design §9.12 flagged vestige). The metadata's `committed`
bool and `committed_payload_layers` dict were write-only residue of the option-A
quorum the GC removed: set at construction, validated in __post_init__, copied in
split() -- but their only content/True writer was the deleted
_commit_cp_shared_l2_layers_batched. Verified tree-wide there is NO live reader
(`committed` appears only in split's `committed=self.committed` copy;
`committed_payload_layers` only in __post_init__ validation + split copy +
construction). Commit consensus under B1 is the allocator's `_committed_objects`
(MIN frontier), so `metadata.committed` was a redundant second source of truth.
CORRECTION to the original flag: `required_payloads` is NOT a vestige -- it is
LIVE (read by cache_controller.load_cp_shared_l2, the evict path hiradix:2748,
and the readback payload planning). KEPT.
Removed: the 2 dataclass fields + their __post_init__ validation + the two split()
child-copies + the cache_controller reserve-construction kwargs + 4 test
constructions/assertions. No behavior change (fields were never read). Pool suite
88/88 (syh-dev-new/torch-2.11 env) + import smoke confirm the metadata dataclass is
now {logical_len, padded_len, page_size, object_ranges, required_payloads, object_key}.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -512,10 +512,8 @@ class TestCpSharedL2Metadata(unittest.TestCase):
|
||||
page_size=64,
|
||||
object_ranges=ranges,
|
||||
required_payloads=(PAYLOAD_TARGET_KV, PAYLOAD_INDEX_K),
|
||||
committed_payload_layers={PAYLOAD_TARGET_KV: {0, 1}, PAYLOAD_INDEX_K: {0}},
|
||||
)
|
||||
|
||||
self.assertFalse(metadata.committed)
|
||||
self.assertIs(
|
||||
metadata.object_ranges[PAYLOAD_TARGET_KV], ranges[PAYLOAD_TARGET_KV]
|
||||
)
|
||||
@@ -554,7 +552,6 @@ class TestCpSharedL2Metadata(unittest.TestCase):
|
||||
)
|
||||
},
|
||||
required_payloads=(PAYLOAD_TARGET_KV,),
|
||||
committed_payload_layers={},
|
||||
)
|
||||
|
||||
def test_shared_metadata_split_partitions_payload_ranges_by_page(self):
|
||||
@@ -581,11 +578,6 @@ class TestCpSharedL2Metadata(unittest.TestCase):
|
||||
),
|
||||
},
|
||||
required_payloads=(PAYLOAD_TARGET_KV, PAYLOAD_DRAFT_KV),
|
||||
committed_payload_layers={
|
||||
PAYLOAD_TARGET_KV: {0, 1},
|
||||
PAYLOAD_DRAFT_KV: {0},
|
||||
},
|
||||
committed=True,
|
||||
object_key="node-10",
|
||||
)
|
||||
|
||||
@@ -595,8 +587,6 @@ class TestCpSharedL2Metadata(unittest.TestCase):
|
||||
self.assertEqual(parent.padded_len, 128)
|
||||
self.assertEqual(child.logical_len, 64)
|
||||
self.assertEqual(child.padded_len, 128)
|
||||
self.assertTrue(parent.committed)
|
||||
self.assertTrue(child.committed)
|
||||
self.assertEqual(parent.required_payloads, metadata.required_payloads)
|
||||
self.assertEqual(child.required_payloads, metadata.required_payloads)
|
||||
self.assertEqual(
|
||||
@@ -660,7 +650,6 @@ class TestCpSharedL2Metadata(unittest.TestCase):
|
||||
)
|
||||
},
|
||||
required_payloads=(PAYLOAD_TARGET_KV,),
|
||||
committed_payload_layers={PAYLOAD_TARGET_KV: {0}},
|
||||
object_key="node-11",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user