Documentation ¶
Overview ¶
package vdiff implements the Vitess Diff functionality which compares the logical contents of MySQL tables across keyspaces and shards
Please see ./README.md for more information.
Index ¶
- Variables
- type DiffMismatch
- type DiffReport
- type Engine
- func (vde *Engine) Close()
- func (vde *Engine) InitDBConfig(dbcfgs *dbconfigs.DBConfigs)
- func (vde *Engine) IsOpen() bool
- func (vde *Engine) Open(ctx context.Context, vre *vreplication.Engine)
- func (vde *Engine) PerformVDiffAction(ctx context.Context, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error)
- type RowDiff
- type VDiffAction
- type VDiffState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Actions = []VDiffAction{CreateAction, ShowAction, ResumeAction} ActionArgs = []string{AllActionArg, LastActionArg} )
Functions ¶
This section is empty.
Types ¶
type DiffMismatch ¶
type DiffMismatch struct { Source *RowDiff `json:"Source,omitempty"` Target *RowDiff `json:"Target,omitempty"` }
DiffMismatch is a sample of row diffs between source and target.
type DiffReport ¶
type DiffReport struct { TableName string // counts ProcessedRows int64 MatchingRows int64 MismatchedRows int64 ExtraRowsSource int64 ExtraRowsTarget int64 // actual data for a few sample rows ExtraRowsSourceDiffs []*RowDiff `json:"ExtraRowsSourceSample,omitempty"` ExtraRowsTargetDiffs []*RowDiff `json:"ExtraRowsTargetSample,omitempty"` MismatchedRowsDiffs []*DiffMismatch `json:"MismatchedRowsSample,omitempty"` }
DiffReport is the summary of differences for one table.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) InitDBConfig ¶
func (*Engine) PerformVDiffAction ¶
func (vde *Engine) PerformVDiffAction(ctx context.Context, req *tabletmanagerdatapb.VDiffRequest) (*tabletmanagerdatapb.VDiffResponse, error)
type RowDiff ¶
type RowDiff struct { Row map[string]string `json:"Row,omitempty"` Query string `json:"Query,omitempty"` }
RowDiff is a row that didn't match as part of the comparison.
type VDiffAction ¶
type VDiffAction string //nolint
const ( CreateAction VDiffAction = "create" ShowAction VDiffAction = "show" ResumeAction VDiffAction = "resume" AllActionArg = "all" LastActionArg = "last" )
type VDiffState ¶
type VDiffState string //nolint
vdiff operation states: pending/started/completed/error/unknown vdiff table states: pending/started/completed/error/unknown
const ( PendingState VDiffState = "pending" StartedState VDiffState = "started" CompletedState VDiffState = "completed" ErrorState VDiffState = "error" UnknownState VDiffState = "" TimestampFormat = "2006-01-02 15:04:05" )
Click to show internal directories.
Click to hide internal directories.