Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfce1297

Browse files
committed
util: avoid redundant sync interests when remote has missing nodes
1 parent43abefa commitfce1297

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎ndn_python_repo/utils/passive_svs.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ def sync_handler(self, name: FormalName, _param: InterestParam, _app_param: Bina
132132
iflen(diff)>0:
133133
self.logger.info(f'Remote missing nodes:{list(diff)}')
134134
# Missing nodes may only exist in other nodes' sync interest,
135-
# therefore we have to send all buffered sync interest out
135+
# therefore we have to send all buffered sync interest out,
136+
# unless they were sent before.
137+
already_sent= []
136138
for_,raw_instinself.inst_buffer.items():
137-
self.send_interest(raw_inst)
139+
ifraw_instnotinalready_sent:
140+
already_sent.append(raw_inst)
141+
self.send_interest(raw_inst)
138142
ifneed_fetch:
139143
self.on_missing_data(self)
140144

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp