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

ipfs / ipfs-cluster / 3576 / 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 10s
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 05:59PM UTC coverage: 64.863% (-0.6%) from 65.434%
3576.1

push

travis-ci-com

hsanjuan
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>

7624 of 11754 relevant lines covered (64.86%)

69.05 hits per line

Source Files on job 3576.1
  • Tree
  • List 0
  • Changed 25
  • Source Changed 12
  • Coverage Changed 25
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2751
  • Travis Job 3576.1
  • f78ca815 on github
  • Prev Job for on feat/datastore (#3573.1)
  • Next Job for on feat/datastore (#3578.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