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

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

Merged
merged 1 commit into from Aug 10, 2021

Conversation

@karalabe
Copy link
Member

@karalabe karalabe commented Aug 10, 2021

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
Contributor

@holiman holiman left a comment

LGTM

@karalabe karalabe merged commit 520f256 into ethereum:master Aug 10, 2021
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants