Skip to content

Commit 593c0c7

Browse files
authored
Merge pull request #94 from ipfs/fix/badger-deps
Gxed Badger hack: use the same net/trace everywhere
2 parents d9497bf + b368e0a commit 593c0c7

File tree

20 files changed

+2641
-23
lines changed

20 files changed

+2641
-23
lines changed

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
GO111MODULE = on
22

3-
check:
4-
@echo "verifying that we have no external dependencies"
5-
@test "$$(go list -m all)" = "github.com/ipfs/fs-repo-migrations"
6-
73
install:
8-
go install
4+
go install -mod=vendor
95
@echo "fs-repo-migrations now installed, type 'fs-repo-migrations' to run"
106

117
test: test_go sharness
128

139
test_go:
14-
go test ./ipfs-5-to-6/... ./ipfs-7-to-8/... # go test ./... fails see #66
10+
go build -mod=vendor
11+
go test -mod=vendor ./...
1512

1613
sharness:
1714
make -C sharness

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module github.com/ipfs/fs-repo-migrations
22

33
go 1.13
4+
5+
require golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa

go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
2+
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA=
3+
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
4+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
5+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/compaction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"log"
2323
"sync"
2424

25-
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmTEmsyNnckEq8rEfALfdhLHjrEHGoSGFDrAYReuetn7MC/go-net/trace"
25+
"golang.org/x/net/trace"
2626

2727
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/table"
2828
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/y"

ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/options"
3232

33-
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmTEmsyNnckEq8rEfALfdhLHjrEHGoSGFDrAYReuetn7MC/go-net/trace"
33+
"golang.org/x/net/trace"
3434

3535
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors"
3636
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/skl"

ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/levels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"sort"
2424
"time"
2525

26-
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmTEmsyNnckEq8rEfALfdhLHjrEHGoSGFDrAYReuetn7MC/go-net/trace"
26+
"golang.org/x/net/trace"
2727

2828
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors"
2929
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/protos"

ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/value.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ import (
3737

3838
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/options"
3939

40-
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmTEmsyNnckEq8rEfALfdhLHjrEHGoSGFDrAYReuetn7MC/go-net/trace"
4140
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors"
4241
"github.com/ipfs/fs-repo-migrations/ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/y"
42+
"golang.org/x/net/trace"
4343
)
4444

4545
// Values have their first byte being byteData or byteDelete. This helps us distinguish between

ipfs-6-to-7/gx/ipfs/QmdKhi5wUQyV9i3GcTyfUmpfTntWjXu8DcyT9HyNbznYrn/badger/y/metrics.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ var (
5252

5353
// These variables are global and have cumulative values for all kv stores.
5454
func init() {
55-
NumReads = expvar.NewInt("badger_disk_reads_total")
56-
NumWrites = expvar.NewInt("badger_disk_writes_total")
57-
NumBytesRead = expvar.NewInt("badger_read_bytes")
58-
NumBytesWritten = expvar.NewInt("badger_written_bytes")
59-
NumLSMGets = expvar.NewMap("badger_lsm_level_gets_total")
60-
NumLSMBloomHits = expvar.NewMap("badger_lsm_bloom_hits_total")
61-
NumGets = expvar.NewInt("badger_gets_total")
62-
NumPuts = expvar.NewInt("badger_puts_total")
63-
NumBlockedPuts = expvar.NewInt("badger_blocked_puts_total")
64-
NumMemtableGets = expvar.NewInt("badger_memtable_gets_total")
65-
LSMSize = expvar.NewMap("badger_lsm_size_bytes")
66-
VlogSize = expvar.NewMap("badger_vlog_size_bytes")
67-
PendingWrites = expvar.NewMap("badger_pending_writes_total")
55+
NumReads = expvar.NewInt("badger_disk_reads_total2")
56+
NumWrites = expvar.NewInt("badger_disk_writes_total2")
57+
NumBytesRead = expvar.NewInt("badger_read_bytes2")
58+
NumBytesWritten = expvar.NewInt("badger_written_bytes2")
59+
NumLSMGets = expvar.NewMap("badger_lsm_level_gets_total2")
60+
NumLSMBloomHits = expvar.NewMap("badger_lsm_bloom_hits_total2")
61+
NumGets = expvar.NewInt("badger_gets_total2")
62+
NumPuts = expvar.NewInt("badger_puts_total2")
63+
NumBlockedPuts = expvar.NewInt("badger_blocked_puts_total2")
64+
NumMemtableGets = expvar.NewInt("badger_memtable_gets_total2")
65+
LSMSize = expvar.NewMap("badger_lsm_size_bytes2")
66+
VlogSize = expvar.NewMap("badger_vlog_size_bytes2")
67+
PendingWrites = expvar.NewMap("badger_pending_writes_total2")
6868
}

sharness/dependencies/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/ipfs/ipfs-update v0.0.0-20200112135517-ca8d7d3af0c2
88
github.com/ipfs/iptb v1.4.0
99
github.com/ipfs/iptb-plugins v0.2.1
10+
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c // indirect
1011
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded
1112
github.com/multiformats/go-multiaddr v0.2.0
1213
github.com/multiformats/go-multiaddr-net v0.1.1

sharness/dependencies/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQ
122122
github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
123123
github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs=
124124
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
125+
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c h1:uUx61FiAa1GI6ZmVd2wf2vULeQZIKG66eybjNXKYCz4=
126+
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU=
125127
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded h1:fHCa28iw+qaRWZK4IqrntHxXALD5kKr/ESrpOCRRdrg=
126128
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded/go.mod h1:FKvZrl5nnaGnTAMewcq0i7wM5zHD75e0lwlnF8q46uo=
127129
github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs=

0 commit comments

Comments
 (0)