Skip to content

Conversation

@fjl
Copy link
Contributor

@fjl fjl commented Nov 23, 2022

While investigating #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.

@rjl493456442
Copy link
Member

The only invocation is https://github.com/ethereum/go-ethereum/blob/master/core/blockchain.go#L1112

In case if ancient.Sync fails, if machine is not crashed, it should still be fine; if machine is crashed, part of ancient data is flushed into file and these "extra" data should be truncated in the next restart.

But the fix is definitely good.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@holiman holiman added this to the 1.11.0 milestone Nov 24, 2022
@fjl fjl merged commit 193f350 into ethereum:master Nov 24, 2022
lochjin pushed a commit to lochjin/go-ethereum that referenced this pull request Nov 28, 2022
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)
dindinw added a commit to Qitmeer/go-ethereum that referenced this pull request Nov 28, 2022
lochjin pushed a commit to lochjin/go-ethereum that referenced this pull request Nov 30, 2022
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)
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
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.
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