Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Skip locking in statedb for non-canon blocks #10141

Merged
merged 1 commit into from Jan 14, 2019
Merged

Skip locking in statedb for non-canon blocks #10141

merged 1 commit into from Jan 14, 2019

Conversation

sorpaas
Copy link
Collaborator

@sorpaas sorpaas commented Jan 7, 2019

For non-canon blocks, we still clone StateDB and lock cache when get accounts, while the account cache is not usable at all. This PR makes it to early return to skip the lock. The change may be helpful for situations like a archive node under heavy load for eth_call (because canon sync and RPC won't compete for locks of cache anymore).

cc @insipx

@sorpaas sorpaas added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Jan 7, 2019
@sorpaas sorpaas added this to the 2.3 milestone Jan 7, 2019
@5chdn 5chdn modified the milestones: 2.3, 2.4 Jan 10, 2019
@ascjones ascjones merged commit e8e087f into master Jan 14, 2019
@niklasad1 niklasad1 deleted the sp-skip-lock branch January 14, 2019 14:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants