-
Notifications
You must be signed in to change notification settings - Fork 4
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
op-node: parallel events executor #4
Conversation
add metrics and fix data race
origin eth.L1BlockRef | ||
resetL2Safe eth.L2BlockRef | ||
resetSysConfig eth.SystemConfig |
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.
Should we add mutex for this fields as well? Will they be modified concurrently by multiple goroutines?
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.
These fields are internal variables and will only be modified by the Step()
, but this function will only be called in the pipeline
goroutine and not be called by other handler
goroutine.
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.
@claymega I see Reset()
function also modify this two variables and Reset()
function may also be called by the main event loop. Can you confirm this will not cause a race?
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.
@claymega I see
Reset()
function also modify this two variables andReset()
function may also be called by the main event loop. Can you confirm this will not cause a race?
Right, Reset()
also modifies these two variables, and I re-check it, Reset()
only be called in the pipeline
goroutine
* run op-node in parallel-event mode * add metrics and fix data race * delete debug log * delete metrics * recover executor_global_test.go * modify the variable type and function name * modify comment
* run op-node in parallel-event mode * add metrics and fix data race * delete debug log * delete metrics * recover executor_global_test.go * modify the variable type and function name * modify comment
* run op-node in parallel-event mode * add metrics and fix data race * delete debug log * delete metrics * recover executor_global_test.go * modify the variable type and function name * modify comment
该分支源于 op-node: parallel events executor, 使处理event的handler能够并行执行 (event是derivation和sequence逻辑的步骤的抽象概念).
event loop
线程和其它handler线程的data race问题解决;