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

ipfs / ipfs-cluster
65%
master: 65%

Build:
Build:
LAST BUILD BRANCH: feat/expvar
DEFAULT BRANCH: master
Repo Added 08 Dec 2016 04:18PM UTC
Files 37
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

LAST BUILD ON BRANCH fix/post-sharding
branch: fix/post-sharding
CHANGE BRANCH
x
Reset
  • fix/post-sharding
  • 0.2.0/changelog
  • 0.2.1/changelog
  • 0.3.0/changelog
  • 0.3.2/changelog
  • 0.3.3/changelog
  • 0.3.4/changelog
  • 0.3.5/changelog
  • 0.4.0/changelog
  • 0.5.0/changelog
  • 0.6.0/changelog
  • 0.7.0/changelog
  • 0.8.0/changelog
  • 0.9.0
  • 162-new-configs
  • 192-docs
  • 45-peer-failure
  • 97-default-data-folder
  • add-config-alloc-default
  • add-proxy-hijack
  • autosyncs
  • captain-log-update
  • captain-log-update-2
  • catch-sighup
  • catch-sigup
  • changelog_v0.3.1
  • codeclimate
  • connect-ipfs-nodes
  • disk-informer
  • doc/add-swagger-config
  • doc/add-use-cases
  • doc/cluster-guide-broken-link
  • doc/composite-cluster-usecases
  • doc/dag-sharding-rfc
  • doc/readme-go-version
  • doc/user-registry
  • docker-compose
  • docker/run-daemon-default
  • docs/cluster-secret-links
  • docs/move-to-website
  • documentation/architecture.md-updates
  • feat/131-new-raft
  • feat/201-version-subcmd
  • feat/219-peers
  • feat/260-api-client
  • feat/269-shell-client
  • feat/277-min-max-repl-factor
  • feat/339-faster-tests
  • feat/632-stream-channels
  • feat/632-stream-channels-client
  • feat/SHARDING-files-over-rest
  • feat/api-basic-auth
  • feat/api-headers
  • feat/auto-migration
  • feat/backups-upgrade-path
  • feat/client-add
  • feat/client_features
  • feat/cmd/svc/force-quit
  • feat/code_quality
  • feat/component-env-cfg
  • feat/connectivity-graph
  • feat/ctl-cmd/no-status-flag
  • feat/datastore
  • feat/dht
  • feat/docker-gx-make
  • feat/docker-test
  • feat/env-cfg
  • feat/error-msgs-bootstrap
  • feat/expvar
  • feat/fix-testclusterspeerrejoin
  • feat/flush-adder-output
  • feat/free-space-allocation-metric
  • feat/fs-lock
  • feat/gossipsub
  • feat/https-api-endpoint
  • feat/improve-pin-serial
  • feat/ipfs-block
  • feat/ipld-bubble
  • feat/migration-framework
  • feat/new-pin-options
  • feat/new-pintype-tests
  • feat/peer-add-hide
  • feat/pin-method-default-refs
  • feat/pin-priority-peers
  • feat/pin-refs
  • feat/pinning-mods
  • feat/pintracker-revamp
  • feat/pnet
  • feat/promote-consensus
  • feat/pubsub-monitoring
  • feat/raft-state-backups
  • feat/recursive-pins
  • feat/remove-legacy
  • feat/rest/client/wait
  • feat/restapi-libp2p
  • feat/service/lock-msg
  • feat/sharding
  • feat/sharding-clean-add
  • feat/sharding-component
  • feat/sharding-frontend-tests
  • feat/sharding-state-format
  • feat/sharding-use-pin-feats
  • feat/sharding-v1
  • feat/state-cmds
  • feat/state-update-guide
  • feat/travis-cache
  • feat/try-jenkins
  • feat/use-ipfs-to-download-gx
  • feat/use-stdlib-reverse-proxy
  • feat/wrong-secrets
  • fix-realloc
  • fix-service-docs
  • fix/105-panic-rpc-calls
  • fix/154-dockerfile
  • fix/182-check-err
  • fix/202-32-bit
  • fix/203-peers-ignored
  • fix/208-repl-factor
  • fix/213-save
  • fix/224-pin-progress
  • fix/240-logging
  • fix/297-state-unmarshal
  • fix/340-races
  • fix/408-TestClustersPin-final
  • fix/412-template-for-issues
  • fix/433-floodsub-panic
  • fix/462-dns-ipfs-api
  • fix/466-proxy-repo-stat
  • fix/495-proxy-add
  • fix/520-snapcraft-stages
  • fix/543-add-unhealthy
  • fix/548-keepalives
  • fix/552-stateless-test
  • fix/554-snap-deploy
  • fix/639-cors-restapi
  • fix/StatusSync
  • fix/access-control-headers
  • fix/add-output-format
  • fix/add-with-spaces-in-name
  • fix/api-client
  • fix/api-consts
  • fix/bad-subcommand
  • fix/cancelled-context-repo-stat
  • fix/cg-tests-jenkins
  • fix/client-cid-pointer
  • fix/client-ipfs
  • fix/client-resolve-panic
  • fix/client/timeout
  • fix/config-errors
  • fix/config/disable-repinnings
  • fix/cors-and-headers
  • fix/ctl-descriptions
  • fix/ctl-https
  • fix/daemon-error
  • fix/data-folder
  • fix/dockerfile-again
  • fix/downcase_api_config_id
  • fix/empty-cluster-secret
  • fix/empty-config-option
  • fix/error-msgs
  • fix/fast-repo-stat
  • fix/fmt-pnet_test
  • fix/go-1.11
  • fix/godoc-wait-for
  • fix/govet
  • fix/health-metrics
  • fix/host-nat
  • fix/ipfsconn-with-POST
  • fix/ipfsconn/api-compat
  • fix/jenkins
  • fix/libp2p
  • fix/lock-service
  • fix/make-test
  • fix/minor-fixes
  • fix/minor-version-compat
  • fix/move-index-up
  • fix/official-builds
  • fix/peer-rm
  • fix/pin-context-timeout
  • fix/pin-ls-check
  • fix/pinls
  • fix/pintracker-data-races
  • fix/proxy-headers
  • fix/proxy-paths
  • fix/query-encode-filter
  • fix/recover-pin
  • fix/remote-error
  • fix/sharding-state-upgrade
  • fix/sharness-jq-typo
  • fix/snaps-again2
  • fix/snapshot-wait-for-index
  • fix/start-panic
  • fix/status-output
  • fix/status-when-peer-down
  • fix/svc/init/lock
  • fix/tests
  • fix/tracing-service-name
  • fix/type-errors
  • fix/update-go-cid
  • fix/update-go-dot
  • fix/update-json-config
  • fix/upgrade-empty-state
  • fix/validate-state
  • fix/wait
  • fix/webfile-gx
  • go-1.10
  • godocs
  • guide
  • gx/files2
  • gx/update-mudygh
  • gx/update-psxsm3
  • issue_445
  • issue_450
  • issue_485
  • issue_587
  • issue_616
  • issue_646
  • libp2p-6.0.19
  • libp2p-6.0.23
  • libp2p-6.0.29
  • log/cluster/version-difference-err
  • master
  • migrator
  • no-map-pintracker
  • pin-bot
  • pin-ls-cid
  • pin-ls-recursive
  • race-fixes-picks
  • readme-improv
  • release-fixes
  • remove-go-ipfs-dep
  • remove/snaps
  • rfc/collaborative-pinsets
  • set-proxy-status
  • sharding/move-zg0-dex-to-cluster
  • sharness/basic-auth
  • small-fixes
  • small-fixes-2
  • ssl-params
  • statelesstracker
  • style
  • submodules
  • test/clean-shard-testing
  • test/sharness-api-https
  • test/sharness-https-api
  • test/squash
  • tests/shards
  • tests/update-sharness-configs
  • travis-sharness
  • update-deps
  • update/go-ipfs-files
  • update/go-libp2p-pubsub
  • update/gx
  • update/gx-versions
  • update/gx-versions3
  • update/libp2p
  • update/libp2p-6
  • update/libp2p-6.0.33
  • update/libp2p-6.0.35
  • use-multiaddr-net
  • v0.0.11
  • v0.0.12
  • v0.1.0
  • v0.2.0
  • v0.2.1
  • v0.3.1
  • v0.3.2
  • v0.3.3
  • v0.3.4
  • v0.3.5
  • v0.4.0
  • v0.4.0-rc1
  • v0.4.0-rc2
  • v0.5.0
  • v0.5.0-rc1
  • v0.6.0
  • v0.6.0-rc1
  • v0.7.0
  • v0.7.0-rc1
  • v0.8.0-rc1
  • v0.9.0
  • v0.9.0-rc1

29 Oct 2018 12:41PM UTC coverage: 64.909% (-0.5%) from 65.374%
3096

push

travis-ci

hsanjuan
Sharding: Fix unpinning of common shards

As documented in #496, unpinning a shard which is part of multiple
cluster-DAGs was not handled.

Before, we had a back link to the ClusterDAGs (.Parents) in the shards,
but this implied patching (re-pinning) all shard objects created at the
end of the adding process when the ClusterDAGPin is created and known.

Alternatively, we could make shards unique, but this defeats the property
that if a shard is already allocated somewhere, we should not re-store its
parts on a potentially different allocation because we cannot distinguish
they are the same.

Another approach, taken here, is to count all the times shard is part of a
clusterDAG when unpinning. This requires reading all the ClusterDAGs blocks and
writing down their shards counting how many times they are referenced.
**This may not scale well**. The main part of this PR is the end-to-end
tests for sharding, which should still work regardless of the approach.

Issues with this approach: unpinning will be slow when:

* The state has many items (we need to loop all of them and pick ClusterDAG pins)
* The state has many clusterDAG pins (we need to read the blocks from IPFS,
  parse them and loop the Links() (shards).
* The clusterDAGs have many shards. We loop the shard CIDs and put them
  into a map to count how many times they are referenced. Many shards
  will potentially make a big map.
* Unpinning multiple things affecting the same shards at the same time? Might as well leave
  things pinned.

Issues with the having-a-Parents-reference-in-every-shard approach:

* We need to re-pin shards at the end of adding
* Potentially a big mess if things go wrong.
* Unpinning is easier

Other approaches:

* Counting the references in the pin (carrying a number instead of Parents)
  * Would not need shard re-pinning (pinning a shard-pin that exists just increases count + 1)
  * Would not need looping the state for unpin
  * Adds one more field to the pin type (space)... (continued)

58 of 58 new or added lines in 3 files covered. (100.0%)

6341 of 9769 relevant lines covered (64.91%)

104.39 hits per line

Relevant lines Covered
Build:
Build:
9769 RELEVANT LINES 6341 COVERED LINES
104.39 HITS PER LINE
Source Files on fix/post-sharding
  • List 0
  • Changed 46
  • Source Changed 46
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
3096 fix/post-sharding Sharding: Fix unpinning of common shards As documented in #496, unpinning a shard which is part of multiple cluster-DAGs was not handled. Before, we had a back link to the ClusterDAGs (.Parents) in the shards, but this implied patching (re-pinni... push 29 Oct 2018 12:56PM UTC hsanjuan travis-ci
64.91
3001 fix/post-sharding Sharding: Fix unpinning of common shards As documented in #496, unpinning a shard which is part of multiple cluster-DAGs was not handled. Before, we had a back link to the ClusterDAGs (.Parents) in the shards, but this implied patching (re-pinni... push 19 Oct 2018 10:49AM UTC hsanjuan travis-ci
65.37
See All Builds (2373)
  • Repo on GitHub
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

© 2025 Coveralls, Inc