[WIP] Update deps
This commit is contained in:
6
vendor/github.com/cockroachdb/pebble/sstable/options.go
generated
vendored
6
vendor/github.com/cockroachdb/pebble/sstable/options.go
generated
vendored
@@ -5,6 +5,7 @@
|
||||
package sstable
|
||||
|
||||
import (
|
||||
"github.com/cockroachdb/fifo"
|
||||
"github.com/cockroachdb/pebble/internal/base"
|
||||
"github.com/cockroachdb/pebble/internal/cache"
|
||||
)
|
||||
@@ -111,6 +112,11 @@ type ReaderOptions struct {
|
||||
// The default cache size is a zero-size cache.
|
||||
Cache *cache.Cache
|
||||
|
||||
// LoadBlockSema, if set, is used to limit the number of blocks that can be
|
||||
// loaded (i.e. read from the filesystem) in parallel. Each load acquires one
|
||||
// unit from the semaphore for the duration of the read.
|
||||
LoadBlockSema *fifo.Semaphore
|
||||
|
||||
// User properties specified in this map will not be added to sst.Properties.UserProperties.
|
||||
DeniedUserProperties map[string]struct{}
|
||||
|
||||
|
||||
13
vendor/github.com/cockroachdb/pebble/sstable/reader.go
generated
vendored
13
vendor/github.com/cockroachdb/pebble/sstable/reader.go
generated
vendored
@@ -539,6 +539,15 @@ func (r *Reader) readBlock(
|
||||
}
|
||||
|
||||
// Cache miss.
|
||||
|
||||
if sema := r.opts.LoadBlockSema; sema != nil {
|
||||
if err := sema.Acquire(ctx, 1); err != nil {
|
||||
// An error here can only come from the context.
|
||||
return bufferHandle{}, err
|
||||
}
|
||||
defer sema.Release(1)
|
||||
}
|
||||
|
||||
var compressed cacheValueOrBuf
|
||||
if bufferPool != nil {
|
||||
compressed = cacheValueOrBuf{
|
||||
@@ -571,6 +580,7 @@ func (r *Reader) readBlock(
|
||||
int(bh.Length+blockTrailerLen), readDuration.String())
|
||||
}
|
||||
if stats != nil {
|
||||
stats.BlockBytes += bh.Length
|
||||
stats.BlockReadDuration += readDuration
|
||||
}
|
||||
if err != nil {
|
||||
@@ -628,9 +638,6 @@ func (r *Reader) readBlock(
|
||||
decompressed = transformed
|
||||
}
|
||||
|
||||
if stats != nil {
|
||||
stats.BlockBytes += bh.Length
|
||||
}
|
||||
if decompressed.buf.Valid() {
|
||||
return bufferHandle{b: decompressed.buf}, nil
|
||||
}
|
||||
|
||||
3
vendor/github.com/cockroachdb/pebble/sstable/reader_iter_two_lvl.go
generated
vendored
3
vendor/github.com/cockroachdb/pebble/sstable/reader_iter_two_lvl.go
generated
vendored
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cockroachdb/pebble/internal/base"
|
||||
"github.com/cockroachdb/pebble/objstorage/objstorageprovider"
|
||||
"github.com/cockroachdb/pebble/objstorage/objstorageprovider/objiotracing"
|
||||
)
|
||||
|
||||
@@ -177,7 +178,7 @@ func (i *twoLevelIterator) init(
|
||||
_ = i.topLevelIndex.Close()
|
||||
return err
|
||||
}
|
||||
i.dataRH = r.readable.NewReadHandle(ctx)
|
||||
i.dataRH = objstorageprovider.UsePreallocatedReadHandle(ctx, r.readable, &i.dataRHPrealloc)
|
||||
if r.tableFormat >= TableFormatPebblev3 {
|
||||
if r.Properties.NumValueBlocks > 0 {
|
||||
i.vbReader = &valueBlockReader{
|
||||
|
||||
Reference in New Issue
Block a user