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

[4.0 -> main] Use is_write_window in eos-vm-oc main to determine if it is safe to update code cache #962

Merged
merged 6 commits into from
Apr 4, 2023

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Apr 4, 2023

Merge #960

Resolve #951.

We used to use is_main_thread to determine if it was safe to update eos-vm-cc code cache, as a transaction on the main thread did not run in parallel with read-only threads. Now a read-only transaction on the main thread can run in parallel with read-only threads. It is not safe for a read-only transaction on the main thread to modify code cache data structures. The solution is to use app's execution window. When in write window, all transactions are executed sequentially and no read-only threads are executing transactions.

@linh2931 linh2931 requested review from heifner and spoonincode April 4, 2023 12:36
@linh2931 linh2931 merged commit 553b834 into main Apr 4, 2023
@linh2931 linh2931 deleted the merge_oc_main_thread_fix branch April 4, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update EOS-VM-OC read-only trxs processing due to the changes of execution window behavior
3 participants