Documentation ¶
Index ¶
- Constants
- func NewLocalBackend(ctx context.Context, tls *common.TLS, pdAddr string, cfg *config.TikvImporter, ...) (backend.Backend, error)
- func VerifyRLimit(estimateMaxFiles Rlim_t) error
- type DuplicateManager
- func (manager *DuplicateManager) CollectDuplicateRowsFromLocalIndex(ctx context.Context, tbl table.Table, db *pebble.DB) error
- func (manager *DuplicateManager) CollectDuplicateRowsFromTiKV(ctx context.Context, tbl table.Table) error
- func (manager *DuplicateManager) RepairDuplicateData() error
- func (manager *DuplicateManager) ReportDuplicateData() error
- type DuplicateRequest
- type File
- type KeyAdapter
- type Range
- type RangePropertiesCollector
- type Rlim_t
- type Writer
Constants ¶
View Source
const (
SplitRetryTimes = 8
)
Variables ¶
This section is empty.
Functions ¶
func NewLocalBackend ¶
func NewLocalBackend( ctx context.Context, tls *common.TLS, pdAddr string, cfg *config.TikvImporter, enableCheckpoint bool, g glue.Glue, maxOpenFiles int, ) (backend.Backend, error)
NewLocalBackend creates new connections to tikv.
func VerifyRLimit ¶
VerifyRLimit checks whether the open-file limit is large enough. In Local-backend, we need to read and write a lot of L0 SST files, so we need to check system max open files limit.
Types ¶
type DuplicateManager ¶
type DuplicateManager struct {
// contains filtered or unexported fields
}
func NewDuplicateManager ¶
func NewDuplicateManager( db *pebble.DB, splitCli restore.SplitClient, ts uint64, tls *common.TLS, regionConcurrency int) (*DuplicateManager, error)
func (*DuplicateManager) CollectDuplicateRowsFromLocalIndex ¶
func (manager *DuplicateManager) CollectDuplicateRowsFromLocalIndex( ctx context.Context, tbl table.Table, db *pebble.DB, ) error
Collect rows by read the index in db.
func (*DuplicateManager) CollectDuplicateRowsFromTiKV ¶
func (*DuplicateManager) RepairDuplicateData ¶
func (manager *DuplicateManager) RepairDuplicateData() error
func (*DuplicateManager) ReportDuplicateData ¶
func (manager *DuplicateManager) ReportDuplicateData() error
type DuplicateRequest ¶
type DuplicateRequest struct {
// contains filtered or unexported fields
}
type KeyAdapter ¶
type KeyAdapter interface { // Encode encodes key with rowID and offset. It guarantees the encoded key is in ascending order for comparison. // `buf` is used to buffer data to avoid the cost of make slice. // Implementations of Encode must not reuse the key for encoding. Encode(buf []byte, key []byte, rowID int64, offset int64) []byte // Decode decodes the original key. `buf` is used to buffer data to avoid the cost of make slice. // Implementations of Decode must not reuse the data for decoding. Decode(buf []byte, data []byte) (key []byte, rowID int64, offset int64, err error) // EncodedLen returns the encoded key length. EncodedLen(key []byte) int }
KeyAdapter is used to encode and decode keys.
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range record start and end key for localStoreDir.DB so we can write it to tikv in streaming
type RangePropertiesCollector ¶
type RangePropertiesCollector struct {
// contains filtered or unexported fields
}
func (*RangePropertiesCollector) Add ¶
func (c *RangePropertiesCollector) Add(key pebble.InternalKey, value []byte) error
implement `pebble.TablePropertyCollector` implement `TablePropertyCollector.Add`
func (*RangePropertiesCollector) Finish ¶
func (c *RangePropertiesCollector) Finish(userProps map[string]string) error
func (*RangePropertiesCollector) Name ¶
func (c *RangePropertiesCollector) Name() string
The name of the property collector.
Click to show internal directories.
Click to hide internal directories.