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

[R4R]use more aggressive write cache policy #227

Merged
merged 2 commits into from
May 24, 2021
Merged

Conversation

unclezoro
Copy link
Collaborator

@unclezoro unclezoro commented May 17, 2021

Description

Fix validator failed to produce a block occasionally.

Rationale

The issue is caused by the persistence action, it takes around 48 seconds, so the validator do not have time to produce the block.

 t=2021-05-17T07:49:55+0000 lvl=info msg="Imported new chain segment"            blocks=1   txs=517   mgas=46.932   elapsed=218.339ms   mgasps=214.950  number=7,482,287 hash=0x2a7769438c9d64ce5192        41e99414e75890a37e568db6b24b7daf5dc3814158e8 dirty="2.00 GiB"

t=2021-05-17T07:50:41+0000 lvl=info msg="Persisted trie from memory database"   nodes=5,205,776 size="1.10 GiB"   time=43.360182272s gcnodes=47,892,102 gcsize="16.62 GiB" gctime=2m53.758774587s l        ivenodes=1,017,189 livesize="323.76 MiB"

t=2021-05-17T07:50:41+0000 lvl=info msg="Imported new chain segment"            blocks=1   txs=360   mgas=34.111   elapsed=43.523s     mgasps=0.784    number=7,482,288 hash=0x8aee890ea8e6ef39515c        e2f9cfc91966e04250c019a8f180f54ac4fe27613cfc dirty="439.11 MiB"

We change the distance logic, so that there is more time for a validator to persist cache.

Example

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • manual transaction test passed

Already reviewed by

...

Related issues

... reference related issue #'s here ...

@unclezoro unclezoro changed the title [WIP]use more aggressive write cache policy [R4R]use more aggressive write cache policy May 24, 2021
@unclezoro unclezoro merged commit b67a129 into master May 24, 2021
@unclezoro unclezoro deleted the cache_write_policy branch June 15, 2021 11:15
@j75689 j75689 mentioned this pull request Jul 26, 2021
3 tasks
@wellttllew
Copy link

@guagualvcha

The go-ethereum team has already fixed this race condition issue in ethereum/go-ethereum@28d30b5

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

Successfully merging this pull request may close these issues.

None yet

4 participants