• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ipfs / ipfs-cluster / 3577 / 1
65%
master: 65%

Build:
Build:
LAST BUILD BRANCH: feat/expvar
DEFAULT BRANCH: master
Ran 19 Feb 2019 06:09PM UTC
Files 72
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Feb 2019 06:01PM UTC coverage: 64.982% (-0.3%) from 65.236%
3577.1

Pull #655

travis-ci-com

web-flow
State: Use go-datastore to implement the state interface

Since the beginning, we have used a Go map to store the shared state (pinset)
in memory. The mapstate knew how to serialize itself so that libp2p-raft would
know how to write to disk when it:

* Saved snapshots of the state on shutdown
* Sent the state to a newcomer peer

hashicorp.Raft assumes an in-memory state which is snapshotted from time to
time and read from disk on boot.

This commit adds a `dsstate` implementation of the state interface using
`go-datastore`. This allows to effortlessly switch to a disk-backed state in
the future (as we will need), and also have at our disposal the different
implementations and utilities of Datastore for fine-tuning (caching, batching
etc.).

`mapstate` has been reworked to use dsstate. Ideally, we would not even need
`mapstate`, as it would suffice to initialize `dsstate` with a
`MapDatastore`. BUT, we still need it separate to be able to auto-migrate to
the new format.

This will be the last migration with the current system. Once this has been
released and users have been able to upgrade we will just remove `mapstate` as
it is now.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
Pull Request #655: State: Use go-datastore to implement the state interface

7638 of 11754 relevant lines covered (64.98%)

69.62 hits per line

Source Files on job 3577.1
  • Tree
  • List 0
  • Changed 15
  • Source Changed 6
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2752
  • Travis Job 3577.1
  • 5c93eb25 on github
  • Prev Job for on feat/datastore (#3575.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc