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

Problem: memiavl background snapshot writing don't limit concurrency level #1169

Closed
wants to merge 40 commits into from

Conversation

jacksoom
Copy link
Contributor

@jacksoom jacksoom commented Sep 15, 2023

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

mmsqe and others added 7 commits September 13, 2023 05:29
* Problem: no log converted from native event

* mv doc to script

* Apply suggestions from code review

* refactoring

* revert

* more decoders

* cleanup

* rename

* cleanup

* fix errors

* fix

* fix lint

* fix statedb interface

* skip msg type event

* fix attr handle

* fix lint

* fix contract adr

* add makeFilter

* rm toMixedCase

* Apply suggestions from code review

* fix packetData

* clean up

* decode packetDataHex as data

* add gen bindings

* point to fill blk height

* Apply suggestions from code review

Signed-off-by: yihuang <[email protected]>

---------

Signed-off-by: yihuang <[email protected]>
Co-authored-by: HuangYi <[email protected]>
* Problem: memiavl performance regression when cache miss

Solution:
- make the cache optional

* cleanup
Solution:
- integration latest ethermint

Co-authored-by: mmsqe <[email protected]>
memiavl/multitree.go Outdated Show resolved Hide resolved
memiavl/db.go Outdated Show resolved Hide resolved
@yihuang yihuang changed the title feat(memiavl): Add snapshot writer goroutine limit Problem: memiavl background snapshot writing don't limit concurrency level Sep 15, 2023
memiavl/export.go Fixed Show fixed Hide fixed
@jacksoom jacksoom marked this pull request as ready for review September 15, 2023 08:18
@jacksoom jacksoom requested a review from a team as a code owner September 15, 2023 08:18
@jacksoom jacksoom requested review from mmsqe and calvinaco and removed request for a team September 15, 2023 08:18
Copy link
Collaborator

@mmsqe mmsqe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe could limit with CPU-bound like nProcs := runtime.GOMAXPROCS(0)

CHANGELOG.md Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
jacksoom and others added 2 commits September 15, 2023 16:45
Co-authored-by: mmsqe <[email protected]>
Signed-off-by: jacksoom <[email protected]>
Co-authored-by: mmsqe <[email protected]>
Signed-off-by: jacksoom <[email protected]>
@jacksoom
Copy link
Contributor Author

jacksoom commented Sep 15, 2023

maybe could limit with CPU-bound like nProcs := runtime.GOMAXPROCS(0)

Just prevent affecting other goroutine

Copy link
Collaborator

@yihuang yihuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Minor suggestions.

memiavl/db.go Outdated Show resolved Hide resolved
memiavl/db.go Show resolved Hide resolved
Copy link
Collaborator

@mmsqe mmsqe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would you mind update gomod2nix.toml and sign the commits?

@yihuang
Copy link
Collaborator

yihuang commented Sep 18, 2023

@jacksoom you need to sign all commits, you can squash the commits instead.

memiavl/db_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@yihuang yihuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor suggestions to void adding default option to the test.

mmsqe and others added 20 commits September 18, 2023 10:39
* Problem: no log converted from native event

* mv doc to script

* Apply suggestions from code review

* refactoring

* revert

* more decoders

* cleanup

* rename

* cleanup

* fix errors

* fix

* fix lint

* fix statedb interface

* skip msg type event

* fix attr handle

* fix lint

* fix contract adr

* add makeFilter

* rm toMixedCase

* Apply suggestions from code review

* fix packetData

* clean up

* decode packetDataHex as data

* add gen bindings

* point to fill blk height

* Apply suggestions from code review

Signed-off-by: yihuang <[email protected]>

---------

Signed-off-by: yihuang <[email protected]>
Co-authored-by: HuangYi <[email protected]>
* Problem: memiavl performance regression when cache miss

Solution:
- make the cache optional

* cleanup
Solution:
- integration latest ethermint

Co-authored-by: mmsqe <[email protected]>
Co-authored-by: mmsqe <[email protected]>
Signed-off-by: jacksoom <[email protected]>
Co-authored-by: mmsqe <[email protected]>
Signed-off-by: jacksoom <[email protected]>
simple fix
@yihuang yihuang enabled auto-merge September 18, 2023 02:49
auto-merge was automatically disabled September 18, 2023 04:42

Head branch was pushed to by a user without write access

@jacksoom jacksoom closed this by deleting the head repository Sep 18, 2023
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.

3 participants