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

Fix #300 #18

Merged
merged 4 commits into from
Nov 30, 2022
Merged

Fix #300 #18

merged 4 commits into from
Nov 30, 2022

Conversation

lochjin
Copy link
Collaborator

@lochjin lochjin commented Nov 30, 2022

holiman and others added 4 commits November 30, 2022 10:13
…thereum#26092)

This PR replaces fastcache with a pretty simple LRU which does not require explicit closing.

(cherry picked from commit 5fded04)
This fixes a problem in the SizeConstrainedLRU. The SCLRU uses an underlying simple lru which is not thread safe.
During the Get operation, the recentness of the accessed item is updated, so it is not a pure read-operation. Therefore, the mutex we need is a full mutex, not RLock.

This PR changes the mutex to be a regular Mutex, instead of RWMutex, so a reviewer can at a glance see that all affected locations are fixed.

(cherry picked from commit 8334b5f)
* core/rawdb: fix freezer validation

* core/rawdb: address comment

(cherry picked from commit add1bff)
While investigating ethereum#22374, I noticed that the Sync operation of the
freezer does not take the table lock. It also doesn't call sync for all files
if there is an error with one of them. I doubt this will fix anything, but
didn't want to drop the fix on the floor either.

(cherry picked from commit 193f350)
@lochjin lochjin requested a review from dindinw November 30, 2022 02:36
@dindinw dindinw merged commit 9f7a46f into Qitmeer:v1.10.26-qng Nov 30, 2022
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.

5 participants