-
Notifications
You must be signed in to change notification settings - Fork 1.9k
core/chains/evm/log: prioritize replay requests #6047
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
Conversation
|
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
| // manually by someone who knows what he is doing | ||
| b.backfillBlockNumber.SetValid(blockNumber) | ||
| b.logger.Debugw("Returning from the event loop to replay logs from specific block number", "blockNumber", blockNumber) | ||
| b.onReplayRequest(blockNumber) |
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 we have it above, do we still need it here?
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.
Yes, because we only check above, but then sit and wait here. We still need to yield to replay also.
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.
ah yeah good point
| } | ||
|
|
||
| select { | ||
| case rawLog := <-chRawLogs: |
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.
What happens if we get something on the replayChannel, but there is already a message waiting on the chRawLogs channel (from before the replay). Would that cause issues once the replay starts?
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.
IIUC the replay should only be delayed by one log in the worst case (or one other action here in general, e.g. head), then it would loop again and necessarily select the replay in the priority select.
5a33dc0 to
2719049
Compare
Story details: https://app.shortcut.com/chainlinklabs/story/28587