Skip to content

Commit

Permalink
feat: limit history indexer by height (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
iand authored Nov 18, 2020
1 parent e6d1faa commit 3601852
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 98 deletions.
2 changes: 1 addition & 1 deletion commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ var Run = &cli.Command{
if cctx.Bool("indexhistory") {
scheduler.Add(schedule.TaskConfig{
Name: "ChainHistoryIndexer",
Task: indexer.NewChainHistoryIndexer(rctx.db, rctx.opener, cctx.Int("indexhistory-batch")),
Task: indexer.NewChainHistoryIndexer(rctx.db, rctx.opener, cctx.Int("indexhistory-batch"), heightFrom, heightTo),
Locker: NewGlobalSingleton(ChainHistoryIndexerLockID, rctx.db), // only want one history indexer anywhere to be running
RestartOnFailure: true,
RestartOnCompletion: true,
Expand Down
14 changes: 0 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,20 @@ require (
contrib.go.opencensus.io/exporter/prometheus v0.1.0
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
github.com/fatih/color v1.10.0 // indirect
github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200910194244-f640612a1a1f // indirect
github.com/filecoin-project/go-address v0.0.5-0.20201103152444-f2023ef3f5bb
github.com/filecoin-project/go-bitfield v0.2.3-0.20201110211213-fe2c1862e816
github.com/filecoin-project/go-data-transfer v1.1.0 // indirect
github.com/filecoin-project/go-fil-markets v1.0.4
github.com/filecoin-project/go-multistore v0.0.3
github.com/filecoin-project/go-state-types v0.0.0-20201013222834-41ea465f274f
github.com/filecoin-project/lotus v1.1.4-0.20201116232018-a152d98af82b
github.com/filecoin-project/specs-actors v0.9.12
github.com/filecoin-project/specs-actors/v2 v2.2.0
github.com/filecoin-project/statediff v0.0.8-0.20201027195725-7eaa5391a639
github.com/git-chglog/git-chglog v0.0.0-20200414013904-db796966b373 // indirect
github.com/go-pg/migrations/v8 v8.0.1
github.com/go-pg/pg/v10 v10.3.1
github.com/go-pg/pgext v0.1.4
github.com/hashicorp/golang-lru v0.5.4
github.com/imdario/mergo v0.3.11 // indirect
github.com/ipfs/go-block-format v0.0.2
github.com/ipfs/go-blockservice v0.1.4 // indirect
github.com/ipfs/go-cid v0.0.7
github.com/ipfs/go-datastore v0.4.5
github.com/ipfs/go-ipfs-blockstore v1.0.2
Expand All @@ -33,12 +28,7 @@ require (
github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018
github.com/jackc/pgx/v4 v4.9.0
github.com/lib/pq v1.8.0
github.com/libp2p/go-libp2p-kad-dht v0.11.0 // indirect
github.com/libp2p/go-libp2p-peer v0.2.0
github.com/libp2p/go-libp2p-pubsub v0.4.0 // indirect
github.com/libp2p/go-libp2p-quic-transport v0.9.0 // indirect
github.com/libp2p/go-libp2p-yamux v0.4.1 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-multiaddr v0.3.1
github.com/multiformats/go-multibase v0.0.3
Expand All @@ -47,8 +37,6 @@ require (
github.com/raulk/clock v1.1.0
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df // indirect
github.com/urfave/cli v1.22.5 // indirect
github.com/urfave/cli/v2 v2.2.0
github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163
github.com/willscott/carbs v0.0.3
Expand All @@ -58,8 +46,6 @@ require (
go.opentelemetry.io/otel/sdk v0.12.0
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
gopkg.in/AlecAivazis/survey.v1 v1.8.8 // indirect
gopkg.in/kyokomi/emoji.v1 v1.5.1 // indirect
)

replace github.com/filecoin-project/filecoin-ffi => github.com/filecoin-project/statediff/extern/filecoin-ffi v0.0.0-20201028183730-8e6631500d49
Expand Down
Loading

0 comments on commit 3601852

Please sign in to comment.