Documentation ¶
Index ¶
- Variables
- func DecodeIndexMvccData(indexInfo *model.IndexInfo) func(kv.Key, *kvrpcpb.MvccGetByKeyResponse, map[string]interface{})
- func DecodeRowMvccData(tableInfo *model.TableInfo) func(kv.Key, *kvrpcpb.MvccGetByKeyResponse, map[string]interface{})
- func GetMvccByKey(tikvStore helper.Storage, key kv.Key, ...) string
- type RecordData
- type Reporter
- func (r *Reporter) ReportAdminCheckInconsistent(ctx context.Context, handle kv.Handle, idxRow, tblRow *RecordData) error
- func (r *Reporter) ReportAdminCheckInconsistentWithColInfo(ctx context.Context, handle kv.Handle, colName string, ...) error
- func (r *Reporter) ReportLookupInconsistent(ctx context.Context, idxCnt, tblCnt int, missHd, fullHd []kv.Handle, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAdminCheckInconsistent returns for data inconsistency for admin check. ErrAdminCheckInconsistent = dbterror.ClassAdmin.NewStd(errno.ErrDataInconsistent) // ErrLookupInconsistent returns for data inconsistency for index lookup. ErrLookupInconsistent = dbterror.ClassExecutor.NewStd(errno.ErrDataInconsistentMismatchCount) // ErrAdminCheckInconsistentWithColInfo returns for data inconsistency for admin check but with column info. ErrAdminCheckInconsistentWithColInfo = dbterror.ClassExecutor.NewStd(errno.ErrDataInconsistentMismatchIndex) )
Functions ¶
func DecodeIndexMvccData ¶
func DecodeIndexMvccData(indexInfo *model.IndexInfo) func(kv.Key, *kvrpcpb.MvccGetByKeyResponse, map[string]interface{})
DecodeIndexMvccData creates a closure that captures the indexInfo to be used a decode function in GetMvccByKey.
func DecodeRowMvccData ¶
func DecodeRowMvccData(tableInfo *model.TableInfo) func(kv.Key, *kvrpcpb.MvccGetByKeyResponse, map[string]interface{})
DecodeRowMvccData creates a closure that captures the tableInfo to be used a decode function in GetMvccByKey.
Types ¶
type RecordData ¶
RecordData is the record data composed of a handle and values.
func (*RecordData) String ¶
func (r *RecordData) String() string
type Reporter ¶
type Reporter struct { HandleEncode func(handle kv.Handle) kv.Key IndexEncode func(idxRow *RecordData) kv.Key Tbl *model.TableInfo Idx *model.IndexInfo Sctx sessionctx.Context }
Reporter is a helper to generate report.
func (*Reporter) ReportAdminCheckInconsistent ¶
func (r *Reporter) ReportAdminCheckInconsistent(ctx context.Context, handle kv.Handle, idxRow, tblRow *RecordData) error
ReportAdminCheckInconsistent reports inconsistent when single index row not found in record rows.
func (*Reporter) ReportAdminCheckInconsistentWithColInfo ¶
func (r *Reporter) ReportAdminCheckInconsistentWithColInfo(ctx context.Context, handle kv.Handle, colName string, idxDat, tblDat fmt.Stringer, err error, idxRow *RecordData) error
ReportAdminCheckInconsistentWithColInfo reports inconsistent when the value of index row is different from record row.
func (*Reporter) ReportLookupInconsistent ¶
func (r *Reporter) ReportLookupInconsistent(ctx context.Context, idxCnt, tblCnt int, missHd, fullHd []kv.Handle, missRowIdx []RecordData) error
ReportLookupInconsistent reports inconsistent when index rows is more than record rows.
Click to show internal directories.
Click to hide internal directories.