Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod: bump dragonboat to pebble 1.0.0 #341

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Test
env:
TARGET: ${{ matrix.target }}
Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
- name: Test
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
- name: Test
Expand All @@ -33,29 +33,18 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: MEMFS_TEST=1 make test
go1-18-unit-test:
runs-on: ubuntu-22.04
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
- name: Checkout code
uses: actions/checkout@v3
- name: Test
run: make test
macos-unit-test:
runs-on: macos-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
- name: Test
Expand All @@ -66,7 +55,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
- name: Build
Expand All @@ -77,7 +66,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Build
run: |
git clone https://github.com/lni/dragonboat-example
Expand All @@ -86,11 +75,11 @@ jobs:
make
static-check:
runs-on: ubuntu-22.04
steps:
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Checkout code
uses: actions/checkout@v3
- name: Static check
Expand Down
11 changes: 6 additions & 5 deletions benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
package dragonboat

import (
"math/rand"
"crypto/rand"
mrand "math/rand"
"os"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -69,7 +70,7 @@ func benchmarkEncodedPayload(b *testing.B, ct dio.CompressionType, sz uint64) {
b.ReportAllocs()
b.SetBytes(int64(sz))
input := make([]byte, sz)
rand.Read(input)
_, _ = rand.Read(input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would a test require crypto/rand?
Is math/rand not good enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing lint issue. Like I would be fine with math but that would require changing the linter config which I felt I shouldn't touch.

b.ResetTimer()
for i := 0; i < b.N; i++ {
rsm.GetEncoded(ct, input, nil)
Expand Down Expand Up @@ -177,7 +178,7 @@ func BenchmarkPendingProposalNextKey(b *testing.B) {
cfg := config.Config{ShardID: 1, ReplicaID: 1}
pp := newPendingProposal(cfg, false, p, q)
b.RunParallel(func(pb *testing.PB) {
clientID := rand.Uint64()
clientID := mrand.Uint64()
for pb.Next() {
pp.nextKey(clientID)
}
Expand Down Expand Up @@ -641,7 +642,7 @@ func BenchmarkChunkWriter(b *testing.B) {
cw := rsm.NewChunkWriter(sink, meta)
sz := int64(1024 * 256)
data := make([]byte, sz)
rand.Read(data)
_, _ = rand.Read(data)
b.ReportAllocs()
b.SetBytes(sz)
b.ResetTimer()
Expand All @@ -659,7 +660,7 @@ func BenchmarkSnappyCompressedChunkWriter(b *testing.B) {
w := snappy.NewBufferedWriter(cw)
sz := int64(1024 * 256)
data := make([]byte, sz)
rand.Read(data)
_, _ = rand.Read(data)
b.ReportAllocs()
b.SetBytes(sz)
b.ResetTimer()
Expand Down
45 changes: 28 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,61 @@ module github.com/lni/dragonboat/v4

require (
github.com/VictoriaMetrics/metrics v1.18.1
github.com/cespare/xxhash/v2 v2.1.2
github.com/cockroachdb/errors v1.9.0
github.com/cockroachdb/pebble v0.0.0-20221207173255-0f086d933dac
github.com/cespare/xxhash/v2 v2.2.0
github.com/cockroachdb/errors v1.11.3
github.com/cockroachdb/pebble v1.1.2
github.com/golang/snappy v0.0.4
github.com/google/uuid v1.3.0
github.com/hashicorp/memberlist v0.3.1
github.com/kr/pretty v0.3.0
github.com/kr/pretty v0.3.1
github.com/lni/goutils v1.4.0
github.com/lni/vfs v0.2.1-0.20220616104132-8852fd867376
github.com/lni/vfs v0.2.1-0.20231221160030-d43d3c60804c
github.com/pierrec/lz4/v4 v4.1.14
github.com/stretchr/testify v1.7.0
golang.org/x/exp v0.0.0-20200513190911-00229845015e
golang.org/x/sys v0.12.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df
)

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/getsentry/sentry-go v0.12.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
github.com/hashicorp/go-msgpack v0.5.3 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.0 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/klauspost/compress v1.11.13 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/miekg/dns v1.1.26 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/prometheus/client_golang v1.12.0 // indirect
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/lni/vfs => github.com/buildbuddy-io/vfs v0.2.3

go 1.20
Loading
Loading