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(db): fix concurrent error #4665

Merged
merged 1 commit into from Sep 22, 2022

Conversation

halibobo1205
Copy link
Contributor

@halibobo1205 halibobo1205 commented Sep 21, 2022

What does this PR do?

  1. add write lock for resetDb
  2. add read lock for getStats
  3. disable db metric for checkpointV2 db

Why are these changes required?

  1. resetDb and getStats is not locked properly
  2. See feat(db): add checkpoint v2 for db inconsistency #4614, tmp database and checkpointV2 databases maybe close when involve getStats due to concurrent.

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

Copy link
Contributor

@lurais lurais left a comment

Choose a reason for hiding this comment

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

add some comment

@halibobo1205 halibobo1205 marked this pull request as ready for review September 22, 2022 08:11
@hosein6666
Copy link

15

1. add write lock for resetDb
2. add read lock for getStats
3. disable db metric for checkpointV2 db
@halibobo1205 halibobo1205 merged commit 5fec746 into tronprotocol:release_v4.6.0 Sep 22, 2022
Copy link

@ulviyya889 ulviyya889 left a comment

Choose a reason for hiding this comment

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

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

5 participants