Skip to content

core/state/pruner: fix state bloom sync permission in Windows#23370

Merged
karalabe merged 1 commit intoethereum:masterfrom
karalabe:windows-pruning-fix-b
Aug 10, 2021
Merged

core/state/pruner: fix state bloom sync permission in Windows#23370
karalabe merged 1 commit intoethereum:masterfrom
karalabe:windows-pruning-fix-b

Conversation

@karalabe
Copy link
Copy Markdown
Member

After writing the bloom filter for the offline pruner, we opened the file read-only and synced it to disk. This ensures that the OS flushes all it's internal buffers before we start deleting data.

Whilst on Linux calling fsync on a read-only file works, it does not on Windows. This PR opens the file in read-write mode to work around this quirk.

Fixes #23364.

@karalabe karalabe added this to the 1.10.7 milestone Aug 10, 2021
Copy link
Copy Markdown
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

@karalabe karalabe merged commit 520f256 into ethereum:master Aug 10, 2021
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.

Geth geth snapshot prune-state Fails on Windows

2 participants