-
Notifications
You must be signed in to change notification settings - Fork 29
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
state: replace fastcache with gc-friendly structure #74
Conversation
5686535
to
114cd00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Are we going to replace all LRU cache (
hashicorp/golang-lru
) with LRU in the future? - Do we need
blob_lru
?
@ian0371 In my opinion, we can still consider using hashicorp lru implementation. In terms of usability, it seems to be a matter of preference because I don't see much difference in performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BasicLRU
= LRU implementation (not thread safe)
SizeConstrainedCache
= Wrapped BaiscLRU
(thread safe)
Cache
(lru.go
) = Where is this to be used?
Just to clarify, it seems like #73 is key to resolving the OOM issue. However, it may not be directly related to the current OOM context. Could you confirm? |
This is the hashicorp lru cache and it is used for
Please check this comment ethereum/go-ethereum#26092 (comment). fastcache is the key problem of leak, and it seems heavily triggered by stateAtBlock. If my understanding is different from you, please let me know. |
The
|
Proposed changes
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
I have read the CLA Document and I hereby sign the CLA
in first time contribute$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...