Skip to content

Commit

Permalink
*: Updated pebble, to be same version as tiflow. (pingcap#46355)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss authored Aug 23, 2023
1 parent 2b766b4 commit 05aa171
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1139,13 +1139,13 @@ def go_deps():
name = "com_github_cockroachdb_pebble",
build_file_proto_mode = "disable_global",
importpath = "github.com/cockroachdb/pebble",
sha256 = "06d2cb18472b270a8c41a14b5c23c3e52065d54ee25b0c4d7aa55a63dfb45470",
strip_prefix = "github.com/cockroachdb/pebble@v0.0.0-20210719141320-8c3bd06debb5",
sha256 = "6ecda6200019988f0453986e2f736fe588b94f62bb6db6cdc9f8ba783261d750",
strip_prefix = "github.com/cockroachdb/pebble@v0.0.0-20220415182917-06c9d3be25b3",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20210719141320-8c3bd06debb5.zip",
"http://ats.apps.svc/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20210719141320-8c3bd06debb5.zip",
"https://cache.hawkingrei.com/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20210719141320-8c3bd06debb5.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20210719141320-8c3bd06debb5.zip",
"http://bazel-cache.pingcap.net:8080/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20220415182917-06c9d3be25b3.zip",
"http://ats.apps.svc/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20220415182917-06c9d3be25b3.zip",
"https://cache.hawkingrei.com/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20220415182917-06c9d3be25b3.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20220415182917-06c9d3be25b3.zip",
],
)
go_repository(
Expand Down
4 changes: 2 additions & 2 deletions br/pkg/lightning/backend/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestRangeProperties(t *testing.T) {
for _, p := range cases {
v := make([]byte, p.vLen)
for i := 0; i < p.count; i++ {
_ = collector.Add(pebble.InternalKey{UserKey: p.key, Trailer: pebble.InternalKeyKindSet}, v)
_ = collector.Add(pebble.InternalKey{UserKey: p.key, Trailer: uint64(pebble.InternalKeyKindSet)}, v)
}
}

Expand Down Expand Up @@ -291,7 +291,7 @@ func TestRangePropertiesWithPebble(t *testing.T) {
binary.BigEndian.PutUint64(key, uint64(i*100+j))
err := wb.Set(key, value[:valueLen], writeOpt)
require.NoError(t, err)
err = collector.Add(pebble.InternalKey{UserKey: key, Trailer: pebble.InternalKeyKindSet}, value[:valueLen])
err = collector.Add(pebble.InternalKey{UserKey: key, Trailer: uint64(pebble.InternalKeyKindSet)}, value[:valueLen])
require.NoError(t, err)
}
require.NoError(t, wb.Commit(writeOpt))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/cheynewallace/tabby v1.1.1
github.com/cloudfoundry/gosigar v1.3.6
github.com/cockroachdb/errors v1.8.1
github.com/cockroachdb/pebble v0.0.0-20210719141320-8c3bd06debb5
github.com/cockroachdb/pebble v0.0.0-20220415182917-06c9d3be25b3
github.com/coocood/freecache v1.2.1
github.com/coreos/go-semver v0.3.0
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQ
github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/cockroachdb/pebble v0.0.0-20210719141320-8c3bd06debb5 h1:Igd6YmtOZ77EgLAIaE9+mHl7+sAKaZ5m4iMI0Dz/J2A=
github.com/cockroachdb/pebble v0.0.0-20210719141320-8c3bd06debb5/go.mod h1:JXfQr3d+XO4bL1pxGwKKo09xylQSdZ/mpZ9b2wfVcPs=
github.com/cockroachdb/pebble v0.0.0-20220415182917-06c9d3be25b3 h1:snjwkhKc/ZtYIC/hg6UoT5PrhXcZmCsaB+z0bonMDcU=
github.com/cockroachdb/pebble v0.0.0-20220415182917-06c9d3be25b3/go.mod h1:buxOO9GBtOcq1DiXDpIPYrmxY020K2A8lOrwno5FetU=
github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw=
github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM=
Expand Down Expand Up @@ -1359,6 +1359,7 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210909193231-528a39cd75f3/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
10 changes: 4 additions & 6 deletions util/extsort/disk_sorter.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,8 @@ func (sw *sstWriter) Close() (retErr error) {
meta := &fileMetadata{
fileNum: sw.fileNum,
}
smallest := writerMeta.Smallest(pebble.DefaultComparer.Compare)
largest := writerMeta.Largest(pebble.DefaultComparer.Compare)
meta.startKey = slices.Clone(smallest.UserKey)
meta.lastKey = slices.Clone(largest.UserKey)
meta.startKey = slices.Clone(writerMeta.SmallestPoint.UserKey)
meta.lastKey = slices.Clone(writerMeta.LargestPoint.UserKey)
// Make endKey is exclusive. To avoid unnecessary overlap,
// we append 0 to make endKey is the smallest key which is
// greater than the last key.
Expand Down Expand Up @@ -339,12 +337,12 @@ type sstIter struct {
}

func (si *sstIter) Seek(key []byte) bool {
si.key, si.value = si.iter.SeekGE(key)
si.key, si.value = si.iter.SeekGE(key, false)
return si.key != nil
}

func (si *sstIter) First() bool {
si.key, si.value = si.iter.SeekGE(nil)
si.key, si.value = si.iter.SeekGE(nil, false)
return si.key != nil
}

Expand Down

0 comments on commit 05aa171

Please sign in to comment.