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 syc failed on windows when prune #360

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

unclezoro
Copy link
Collaborator

@unclezoro unclezoro commented Aug 10, 2021

Description

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 ethereum/go-ethereum#23364

Rationale

Fixes ethereum/go-ethereum#23364

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • manual transaction test passed

Already reviewed by

...

Related issues

... reference related issue #'s here ...

@kyrie-yl kyrie-yl merged commit 8d5f2ba into bnb-chain:master Aug 10, 2021
@unclezoro unclezoro mentioned this pull request Aug 11, 2021
3 tasks
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
4 participants