-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[neo2] Raise priority of Ping/Pong #1812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good efforts. We need to port this to NEO 3 later.
neo/Network/P2P/TaskManager.cs
Outdated
@@ -217,8 +218,15 @@ public static Props Props(NeoSystem system) | |||
return Akka.Actor.Props.Create(() => new TaskManager(system)).WithMailbox("task-manager-mailbox"); | |||
} | |||
|
|||
private readonly ConcurrentDictionary<ActorPath, DateTime> _expiredTimes = new ConcurrentDictionary<ActorPath, DateTime>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dictionary<ActorPath, DateTime>
is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better move it to L43.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dictionary<ActorPath, DateTime>
is not thread-safe, may cause insert error in concurrent scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a mechanism for cleaning _expiredTimes
Maybe add a |
yes, a task it's good, something to prevent an |
@Ashuaidehao please take a look to my solution for neo3 without a new collection. #1829 I think that we can do the same here |
Sorry for close, miss click |
@shargon Test PASS, is able to merge. (from BSN side, the issue provider, they work well after this PR till now) |
Raise priority of Ping/Pong to ensure the reliability of syncing blocks process,Close #1806.