Upgrade versions of vendored libs
This commit is contained in:
64
vendor/github.com/cockroachdb/pebble/internal/base/seqnums.go
generated
vendored
64
vendor/github.com/cockroachdb/pebble/internal/base/seqnums.go
generated
vendored
@@ -4,6 +4,8 @@
|
||||
|
||||
package base
|
||||
|
||||
import "fmt"
|
||||
|
||||
// This file defines sequence numbers that are reserved for foreign keys i.e.
|
||||
// internal keys coming from other Pebble instances and existing in shared
|
||||
// storage, as those will "slot below" any internal keys added by our own Pebble
|
||||
@@ -14,41 +16,41 @@ const (
|
||||
// guarantee there are no keys underneath an internal key.
|
||||
SeqNumZero = uint64(0)
|
||||
|
||||
// SeqNumL6Point is the sequence number reserved for foreign point keys in L6.
|
||||
// This sequence number must be lower than SeqNumL6RangeKey for range key
|
||||
// masking to work correctly.
|
||||
SeqNumL6Point = uint64(1)
|
||||
// SeqNumL6 is the sequence number reserved for foreign keys in L6. This seqnum
|
||||
// will be used to expose any range key sets as well as point keys in L6. Range
|
||||
// deletes do not need to be exposed in L6.
|
||||
SeqNumL6 = uint64(1)
|
||||
|
||||
// SeqNumL6RangeKey is the sequence number reserved for foreign range keys in
|
||||
// L6. Only RangeKeySets are expected at this level.
|
||||
SeqNumL6RangeKey = uint64(2)
|
||||
// SeqNumL5 is the sequence number reserved for foreign keys in L5. This seqnum
|
||||
// needs to be greater than SeqNumL6, so that range deletes in L5 can be
|
||||
// exposed at this level and will correctly delete covering points in L6. Also
|
||||
// range key unsets/dels will be exposed at this seqnum and will need to shadow
|
||||
// overlapping range keys in L6.
|
||||
//
|
||||
// Note that we can use the same sequence number for all exposed keys in L5 as
|
||||
// range dels do not delete points at the same seqnum, and range key
|
||||
// unsets/deletes do not coalesce with range key sets at the same seqnum. Range
|
||||
// key masking does not care about the sequence number of overlapping points
|
||||
// (rather, it applies to points based on suffixes), so we can use this seqnum
|
||||
// for all L5 keys exposed.
|
||||
SeqNumL5 = uint64(2)
|
||||
|
||||
// SeqNumL5RangeDel is the sequence number reserved for foreign range deletes
|
||||
// in L5. These keys could delete L6 points.
|
||||
SeqNumL5RangeDel = uint64(3)
|
||||
|
||||
// SeqNumL5Point is the sequence number reserved for foreign point keys in L5.
|
||||
// Any sst-local range deletions would have already been applied to these keys,
|
||||
// so they can safely get a sequence number higher than SeqNumL5RangeDel.
|
||||
// However they must have a sequence number lower than SeqNumL5RangeKey* for
|
||||
// range key masking to work correctly.
|
||||
SeqNumL5Point = uint64(4)
|
||||
|
||||
// SeqNumL5RangeKeyUnsetDel is the sequence number reserved for foreign
|
||||
// range key unsets/deletes in L5. These operations could apply to L6
|
||||
// RangeKeySets, so this sequence number must be > SeqNumL6RangeKey.
|
||||
SeqNumL5RangeKeyUnsetDel = uint64(5)
|
||||
|
||||
// SeqNumL5RangeKeySet is the sequence number reserved for foreign range key
|
||||
// Sets in L5. These operations could apply to L6 RangeKeySets, so this
|
||||
// sequence number must be > SeqNumL6RangeKey. Any SST-local rangekey
|
||||
// unsets/dels have already been applied to them, so their sequence number must
|
||||
// be > SeqNumL5RangeKeyUnsetDel.
|
||||
SeqNumL5RangeKeySet = uint64(6)
|
||||
|
||||
// Sequence numbers 7-9 are reserved for future use.
|
||||
// Sequence numbers 3-9 are reserved for future use.
|
||||
|
||||
// SeqNumStart is the first sequence number assigned to a key written by
|
||||
// ourselves.
|
||||
SeqNumStart = uint64(10)
|
||||
)
|
||||
|
||||
// SeqNumForLevel returns the appropriate reserved sequence number for keys in
|
||||
// foreign sstables at the specified level.
|
||||
func SeqNumForLevel(level int) uint64 {
|
||||
switch level {
|
||||
case 5:
|
||||
return SeqNumL5
|
||||
case 6:
|
||||
return SeqNumL6
|
||||
default:
|
||||
panic(fmt.Sprintf("unexpected foreign sstable at level %d", level))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user