Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unavailable item from active sync requests, fix node stuck issue #2445

Merged
merged 2 commits into from
May 3, 2021

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented May 3, 2021

Fixes #2434 (node gets stuck when syncing).

When got an item_not_available_message from a peer, the item was
removed from the sync_items_requested_from_peer list of the peer,
but it was left in the _active_sync_requests list.
When disconnecting from the peer, since the
sync_items_requested_from_peer list of the peer no longer contains
the item, the cleanup process does not remove it from the
_active_sync_requests list either.
As a result, the node will not request the item from another peer,
thus gets stuck.

This Ci job reproduces the issue: https://github.com/abitmore/bitshares-core/runs/2491471762 ,
this CI job verifies the fix: https://github.com/abitmore/bitshares-core/runs/2491784005 (note: the log files are large).

When got an `item_not_available_message` from a peer, the item was
removed from the `sync_items_requested_from_peer` list of the peer,
but it was left in the `_active_sync_requests` list.
When disconnecting from the peer, since the
`sync_items_requested_from_peer` list of the peer no longer contains
the item, the cleanup process does not remove it from the
`_active_sync_requests` list either.
As a result, the node will not request the item from another peer,
thus gets stuck.
@abitmore abitmore added this to the 5.2.1 - Bugfix Release milestone May 3, 2021
@abitmore abitmore linked an issue May 3, 2021 that may be closed by this pull request
3 tasks
@sonarcloud
Copy link

sonarcloud bot commented May 3, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@ioBanker
Copy link
Member

ioBanker commented May 3, 2021

Thanks.

@abitmore abitmore merged commit b52e5e6 into release May 3, 2021
@abitmore abitmore deleted the fix-node-sync branch May 3, 2021 16:07
Gandalf-the-Grey pushed a commit to openhive-network/hive that referenced this pull request May 5, 2021
Gandalf-the-Grey pushed a commit to openhive-network/hive that referenced this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node-test is failing in Github Actions CI
2 participants