cockroach: github.com/cockroachdb/cockroach/pkg/sql/backfill Index | Files

package backfill

import "github.com/cockroachdb/cockroach/pkg/sql/backfill"

Index

Package Files

backfill.go

func ColumnMutationFilter Uses

func ColumnMutationFilter(m sqlbase.DescriptorMutation) bool

ColumnMutationFilter is a filter that allows mutations that add or drop columns.

func ConvertBackfillError Uses

func ConvertBackfillError(
    ctx context.Context, tableDesc *sqlbase.ImmutableTableDescriptor, b *client.Batch,
) error

ConvertBackfillError returns a cleaner SQL error for a failed Batch.

func IndexMutationFilter Uses

func IndexMutationFilter(m sqlbase.DescriptorMutation) bool

IndexMutationFilter is a filter that allows mutations that add indexes.

type ColumnBackfiller Uses

type ColumnBackfiller struct {
    // contains filtered or unexported fields
}

ColumnBackfiller is capable of running a column backfill for all updateCols.

func (*ColumnBackfiller) Init Uses

func (cb *ColumnBackfiller) Init(
    evalCtx *tree.EvalContext, desc *sqlbase.ImmutableTableDescriptor,
) error

Init initializes a column backfiller.

func (*ColumnBackfiller) RunColumnBackfillChunk Uses

func (cb *ColumnBackfiller) RunColumnBackfillChunk(
    ctx context.Context,
    txn *client.Txn,
    tableDesc *sqlbase.ImmutableTableDescriptor,
    otherTables []*sqlbase.ImmutableTableDescriptor,
    sp roachpb.Span,
    chunkSize int64,
    alsoCommit bool,
    traceKV bool,
) (roachpb.Key, error)

RunColumnBackfillChunk runs column backfill over a chunk of the table using the span sp provided, for all updateCols.

type IndexBackfiller Uses

type IndexBackfiller struct {
    // contains filtered or unexported fields
}

IndexBackfiller is capable of backfilling all the added index.

func (*IndexBackfiller) BuildIndexEntriesChunk Uses

func (ib *IndexBackfiller) BuildIndexEntriesChunk(
    ctx context.Context,
    txn *client.Txn,
    tableDesc *sqlbase.ImmutableTableDescriptor,
    sp roachpb.Span,
    chunkSize int64,
    traceKV bool,
) ([]sqlbase.IndexEntry, roachpb.Key, error)

BuildIndexEntriesChunk reads a chunk of rows from a table using the span sp provided, and builds all the added indexes.

func (*IndexBackfiller) ContainsInvertedIndex Uses

func (ib *IndexBackfiller) ContainsInvertedIndex() bool

ContainsInvertedIndex returns true if backfilling an inverted index.

func (*IndexBackfiller) Init Uses

func (ib *IndexBackfiller) Init(desc *sqlbase.ImmutableTableDescriptor) error

Init initializes an IndexBackfiller.

func (*IndexBackfiller) RunIndexBackfillChunk Uses

func (ib *IndexBackfiller) RunIndexBackfillChunk(
    ctx context.Context,
    txn *client.Txn,
    tableDesc *sqlbase.ImmutableTableDescriptor,
    sp roachpb.Span,
    chunkSize int64,
    alsoCommit bool,
    traceKV bool,
) (roachpb.Key, error)

RunIndexBackfillChunk runs an index backfill over a chunk of the table by tracversing the span sp provided. The backfill is run for the added indexes.

type MutationFilter Uses

type MutationFilter func(sqlbase.DescriptorMutation) bool

MutationFilter is the type of a simple predicate on a mutation.

Package backfill imports 11 packages (graph) and is imported by 4 packages. Updated 2019-09-08. Refresh now. Tools for package owners.