-
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
TaskManager optimization #2615
TaskManager optimization #2615
Conversation
src/neo/Ledger/Blockchain.cs
Outdated
if (!header.Verify(system.Settings, snapshot, system.HeaderCache)) break; | ||
if (!header.Verify(system.Settings, snapshot, system.HeaderCache)) | ||
{ | ||
Sender.Tell(VerifyResult.Invalid); |
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.
Sender.Tell(VerifyResult.Invalid); | |
Sender.Tell(VerifyResult.Invalid); | |
break; |
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.
Why send VerifyResult.Invalid
to RemoteNode
? It doesn't process the message.
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.
This is similar to some other places where akka replies are sent even not processed
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.
Please remove it. VerifyResult
is not used for this purpose.
Co-authored-by: Shargon <shargon@gmail.com>
Ping |
I need 1 week to review more carefully, @Qiao-Jin. |
@shargon Need your review again. |
@@ -236,7 +239,10 @@ private void OnTaskCompleted(IInventory inventory) | |||
session.ReceivedBlock.Add(block.Index, block); | |||
} | |||
} | |||
RequestTasks(Sender, session); | |||
else |
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.
Why this else
?
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.
- If RequestTask is called upon receiving a block, taskManager will seek this block again from its neighbor
- RequestTask will be called upon OnPersistCompleted for this block eventually
…n/neo into taskmanager_optimization
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.
Tested on NeoCompiler. Nice move and good improvement for congestion.
I will double check here the version I used.
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.
Confirmed.
merge? |
@erikzhang @shargon Merge? |
An optimization upon taskmanager and corresponding logic. Fixes logic error in edge cases & reduces network wastes.