[Fix] hicache: Wait for overlapping write-through acknowledgements

(cherry picked from commit 032725770c33c61c236f2884ce7e7ff1fa99cef9)
This commit is contained in:
alphabetc1
2026-11-07 14:37:24 +08:00
committed by minke.yu
parent 5f7be7fab4
commit 520ca548ea
@@ -1694,6 +1694,16 @@ class UnifiedRadixCache(BasePrefixCache):
# backed up. Skip only when no transfer remains.
if device_value.numel() == 0 and not comp_xfers:
continue
# A split fragment keeps the original node's ack, and component
# transfers can cover other nodes. Check the whole publish set,
# not just ack keys, before assigning any node a new ack owner.
publish_set = set(self._backup_publish_node_ids(node_id, comp_xfers))
# Write-back eviction has its own round-wide completion barrier.
if not write_back and any(
not publish_set.isdisjoint(pending.publish_node_ids)
for pending in self.ongoing_write_through.values()
):
self.writing_check(write_back=True)
sidecar_xfers = self._build_backup_sidecar(device_value, comp_xfers)
host_indices = self._execute_kv_backup(
node_id, device_value, comp_xfers, sidecar_xfers