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

metahub: use double dirty KVs to avoid the node being hang #14

Open
qizhou opened this issue Dec 9, 2021 · 0 comments
Open

metahub: use double dirty KVs to avoid the node being hang #14

qizhou opened this issue Dec 9, 2021 · 0 comments

Comments

@qizhou
Copy link

qizhou commented Dec 9, 2021

Rationale

Why should this feature exist?
What are the use-cases?

Implementation

We will have two dirty KVs, where

  1. The first one is read-only KV, which is under committing to DB (can be nil if it is committed)
  2. The second is rw KV

When the second KV is full and the first KV is nil, then we will move the second KV to the first KV, then commit the second KV in a background thread. This should allow the blockchain to continue to work since rw from EVM can be still handled. This also reduces the node hang during compaction.

The only way that the blockchain's operation is blocked when the first KV is full, while the second KV is still being committed, which implies the node's performance cannot meet the performance requirement.

@qizhou qizhou changed the title metahub: use double dirty KVs to reduce commit time metahub: use double dirty KVs to avoid the node being hang Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant