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

introduce Sync() method on blockstores #5057

Open
raulk opened this issue Nov 30, 2020 · 1 comment
Open

introduce Sync() method on blockstores #5057

raulk opened this issue Nov 30, 2020 · 1 comment
Labels
area/chain Area: Chain P2 P2: Should be resolved tribute

Comments

@raulk
Copy link
Member

raulk commented Nov 30, 2020

Goal

To reduce the amount of fsyncing by opening the blockstores (lmdb and badger) in "no sync" mode, and introducing explicit fsyncs only when we're effectively committing new state (i.e. writing a new head).

See discussion in #5050.

Design

  1. Change the blockstore options to enable NoSync mode.
  2. Expand the lotus/lib/blockstore.Blockstore interface to introduce a Sync() method.
  3. Call Sync() from ChainStore#takeHeaviestTipSet, which is when we commit a new head and thus want all previously unflushed chain and state objects to become durable.
@jennijuju
Copy link
Member

We should consider revert #6817 if this is implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chain Area: Chain P2 P2: Should be resolved tribute
Projects
None yet
Development

No branches or pull requests

3 participants