Skip to content

Commit

Permalink
vendor: bump Pebble to 40d39da505a5
Browse files Browse the repository at this point in the history
```
40d39da5 db: produce the FlushEnd event after installing readState
cef3f146 compaction: add support for concurrent manual compactions
cb848478 manifest: add methods for extending table bounds
7e5c8ee1 sstable: move block property collector calls to the Writer client goroutine
0e0d279a  internal/keyspan: move MergingIter from internal/rangekey
09203fd9 *: Expose range key iterators through table cache
894b57aa db: correctly set point key bounds in `TestIngest_UpdateSequenceNumber`
6c7f6ed4 base: update IsExclusiveSentinel to account for multiple range key kinds
e0589417 db: add external sstable merging iterator
85162b61 sstable: unify sstable size estimation by using a single abstraction
bac6da8f internal/rangekey: adjust MergingIter interface, return fragment sets
7eb64ae7 Revert "db: add experimental DB.RegisterFlushCompletedCallback"
2c522458 db: remove unnecessary key clones during ingest load
998400e7 db: fix skipped key during Prev at synthetic range key marker
13f8f7ce *: separately track smallest/largest point/range keys in FileMetadata
7449c652 sstable: change index block size estimation to use inflight size
31899eb1 sstable: flush index blocks only from the Writer client goroutine
129bc0d4 internal/rangekey: fix invariant violation during SeekGE(upper-bound)
87ab6c71 db: write range keys to memtables
```

Release note: None

Release justification: commits merged in Pebble before stability period
  • Loading branch information
jbowens committed Feb 28, 2022
1 parent 4fa089a commit 6ca3fe2
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1287,10 +1287,10 @@ def go_deps():
patches = [
"@cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "1d4eff199bd4952fad40c7c1c64e167ef8600f222f57058ae7a050979c7650d8",
strip_prefix = "github.com/cockroachdb/[email protected]20220217165617-821db50635d6",
sha256 = "71da6a69951ab9767aa51efd34b2a4040ab655f67a5b0be87578af5a85132d26",
strip_prefix = "github.com/cockroachdb/[email protected]20220227235451-40d39da505a5",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20220217165617-821db50635d6.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20220227235451-40d39da505a5.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.13.0
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f
github.com/cockroachdb/pebble v0.0.0-20220217165617-821db50635d6
github.com/cockroachdb/pebble v0.0.0-20220227235451-40d39da505a5
github.com/cockroachdb/redact v1.1.3
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
github.com/cockroachdb/stress v0.0.0-20220217190341-94cf65c2a29f
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0n
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/panicparse/v2 v2.0.0-20211103220158-604c82a44f1e h1:FrERdkPlRj+v7fc+PGpey3GUiDGuTR5CsmLCA54YJ8I=
github.com/cockroachdb/panicparse/v2 v2.0.0-20211103220158-604c82a44f1e/go.mod h1:pMxsKyCewnV3xPaFvvT9NfwvDTcIx2Xqg0qL5Gq0SjM=
github.com/cockroachdb/pebble v0.0.0-20220217165617-821db50635d6 h1:h0QXUCqMzrxfdxAh+WTYZZOqilZBc7sOpDTMFZHzhy4=
github.com/cockroachdb/pebble v0.0.0-20220217165617-821db50635d6/go.mod h1:buxOO9GBtOcq1DiXDpIPYrmxY020K2A8lOrwno5FetU=
github.com/cockroachdb/pebble v0.0.0-20220227235451-40d39da505a5 h1:6ZsiW1sWGEsx2kDq98bdoDfdDeO2IgfI4e2FxUQwkdk=
github.com/cockroachdb/pebble v0.0.0-20220227235451-40d39da505a5/go.mod h1:buxOO9GBtOcq1DiXDpIPYrmxY020K2A8lOrwno5FetU=
github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/stores_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (is Server) CompactEngineSpan(
resp := &CompactEngineSpanResponse{}
err := is.execStoreCommand(ctx, req.StoreRequestHeader,
func(ctx context.Context, s *Store) error {
return s.Engine().CompactRange(req.Span.Key, req.Span.EndKey, true /* forceBottommost */)
return s.Engine().CompactRange(req.Span.Key, req.Span.EndKey)
})
return resp, err
}
2 changes: 1 addition & 1 deletion pkg/storage/disk_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func TestPebbleMapClose(t *testing.T) {
startKey := diskMap.makeKey([]byte{'a'})
startKeyCopy := make([]byte, len(startKey))
copy(startKeyCopy, startKey)
if err := e.db.Compact(startKeyCopy, diskMap.makeKey([]byte{'z'})); err != nil {
if err := e.db.Compact(startKeyCopy, diskMap.makeKey([]byte{'z'}), false /* parallel */); err != nil {
t.Fatal(err)
}

Expand Down
6 changes: 2 additions & 4 deletions pkg/storage/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,8 @@ type Engine interface {
// ApproximateDiskBytes returns an approximation of the on-disk size for the given key span.
ApproximateDiskBytes(from, to roachpb.Key) (uint64, error)
// CompactRange ensures that the specified range of key value pairs is
// optimized for space efficiency. The forceBottommost parameter ensures
// that the key range is compacted all the way to the bottommost level of
// SSTables, which is necessary to pick up changes to bloom filters.
CompactRange(start, end roachpb.Key, forceBottommost bool) error
// optimized for space efficiency.
CompactRange(start, end roachpb.Key) error
// InMem returns true if the receiver is an in-memory engine and false
// otherwise.
//
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/metamorphic/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ type compactOp struct {
}

func (c compactOp) run(ctx context.Context) string {
err := c.m.engine.CompactRange(c.key, c.endKey, false)
err := c.m.engine.CompactRange(c.key, c.endKey)
if err != nil {
return fmt.Sprintf("error: %s", err.Error())
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -1482,14 +1482,14 @@ func (p *Pebble) ApproximateDiskBytes(from, to roachpb.Key) (uint64, error) {

// Compact implements the Engine interface.
func (p *Pebble) Compact() error {
return p.db.Compact(nil, EncodeMVCCKey(MVCCKeyMax))
return p.db.Compact(nil, EncodeMVCCKey(MVCCKeyMax), true /* parallel */)
}

// CompactRange implements the Engine interface.
func (p *Pebble) CompactRange(start, end roachpb.Key, forceBottommost bool) error {
func (p *Pebble) CompactRange(start, end roachpb.Key) error {
bufStart := EncodeMVCCKey(MVCCKey{start, hlc.Timestamp{}})
bufEnd := EncodeMVCCKey(MVCCKey{end, hlc.Timestamp{}})
return p.db.Compact(bufStart, bufEnd)
return p.db.Compact(bufStart, bufEnd, false /* parallel */)
}

// InMem returns true if the receiver is an in-memory engine and false
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/pebble_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (p *pebbleIterator) init(
// We are given an inclusive [MinTimestampHint, MaxTimestampHint]. The
// MVCCWAllTimeIntervalCollector has collected the WallTimes and we need
// [min, max), i.e., exclusive on the upper bound.
p.options.BlockPropertyFilters = []pebble.BlockPropertyFilter{
p.options.PointKeyFilters = []pebble.BlockPropertyFilter{
sstable.NewBlockIntervalFilter(mvccWallTimeIntervalCollector,
uint64(opts.MinTimestampHint.WallTime),
uint64(opts.MaxTimestampHint.WallTime)+1),
Expand Down
2 changes: 1 addition & 1 deletion vendor
Submodule vendor updated 29 files
+46 −61 github.com/cockroachdb/pebble/compaction.go
+11 −6 github.com/cockroachdb/pebble/compaction_picker.go
+66 −29 github.com/cockroachdb/pebble/db.go
+171 −0 github.com/cockroachdb/pebble/external_iterator.go
+6 −2 github.com/cockroachdb/pebble/flush_external.go
+87 −29 github.com/cockroachdb/pebble/ingest.go
+18 −3 github.com/cockroachdb/pebble/internal/base/internal.go
+10 −11 github.com/cockroachdb/pebble/internal/keyspan/bound_iter.go
+122 −189 github.com/cockroachdb/pebble/internal/keyspan/merging_iter.go
+162 −17 github.com/cockroachdb/pebble/internal/manifest/version.go
+14 −2 github.com/cockroachdb/pebble/internal/manifest/version_edit.go
+9 −12 github.com/cockroachdb/pebble/internal/rangekey/defragment.go
+13 −2 github.com/cockroachdb/pebble/internal/rangekey/interleaving_iter.go
+38 −105 github.com/cockroachdb/pebble/internal/rangekey/iter.go
+19 −14 github.com/cockroachdb/pebble/internal/rangekey/rangekey.go
+32 −1 github.com/cockroachdb/pebble/iterator.go
+4 −1 github.com/cockroachdb/pebble/level_iter.go
+32 −5 github.com/cockroachdb/pebble/mem_table.go
+1 −0 github.com/cockroachdb/pebble/open.go
+19 −11 github.com/cockroachdb/pebble/options.go
+51 −35 github.com/cockroachdb/pebble/range_keys.go
+140 −31 github.com/cockroachdb/pebble/sstable/block.go
+27 −18 github.com/cockroachdb/pebble/sstable/reader.go
+7 −3 github.com/cockroachdb/pebble/sstable/suffix_rewriter.go
+21 −12 github.com/cockroachdb/pebble/sstable/write_queue.go
+416 −217 github.com/cockroachdb/pebble/sstable/writer.go
+108 −30 github.com/cockroachdb/pebble/table_cache.go
+1 −1 github.com/cockroachdb/pebble/tool/make_test_find_db.go
+1 −1 modules.txt

0 comments on commit 6ca3fe2

Please sign in to comment.