修改问题
This commit is contained in:
@@ -78,6 +78,14 @@ class DataCollection:
|
||||
# node_id 不变但 data_id 变更,清理旧索引
|
||||
self._data_id_to_node_id.pop(old_node.data_id, None)
|
||||
|
||||
stale_data_ids = [
|
||||
data_id
|
||||
for data_id, existing_node_id in self._data_id_to_node_id.items()
|
||||
if existing_node_id == node.node_id and data_id != node.data_id
|
||||
]
|
||||
for stale_data_id in stale_data_ids:
|
||||
self._data_id_to_node_id.pop(stale_data_id, None)
|
||||
|
||||
if node.data_id and node.data_id != "":
|
||||
existing_node_id = self._data_id_to_node_id.get(node.data_id)
|
||||
if existing_node_id is not None and existing_node_id != node.node_id:
|
||||
|
||||
Reference in New Issue
Block a user