checker

package
v0.0.0-...-5b294ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamSegment = 5000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FullCheckParameter

type FullCheckParameter struct {
	SourceHost   client.RedisHost
	TargetHost   client.RedisHost
	ResultDBFile string
	CompareCount int
	Interval     int
	BatchCount   int
	Parallel     int
	FilterTree   *common.Trie
}

type FullValueVerifier

type FullValueVerifier struct {
	VerifierBase
	// contains filtered or unexported fields
}

func NewFullValueVerifier

func NewFullValueVerifier(stat *metric.Stat, param *FullCheckParameter, ignoreBigKey bool) *FullValueVerifier

func (*FullValueVerifier) CheckFullBigValue_List

func (p *FullValueVerifier) CheckFullBigValue_List(oneKeyInfo *common.Key, conflictKey chan<- *common.Key,
	sourceClient *client.RedisClient, targetClient *client.RedisClient)

func (*FullValueVerifier) CheckFullValueFetchAll

func (p *FullValueVerifier) CheckFullValueFetchAll(keyInfo []*common.Key, conflictKey chan<- *common.Key,
	sourceClient, targetClient *client.RedisClient)

func (*FullValueVerifier) CheckPartialValueHash

func (p *FullValueVerifier) CheckPartialValueHash(oneKeyInfo *common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

func (*FullValueVerifier) CheckPartialValueSet

func (p *FullValueVerifier) CheckPartialValueSet(oneKeyInfo *common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

func (*FullValueVerifier) CheckPartialValueSortedSet

func (p *FullValueVerifier) CheckPartialValueSortedSet(oneKeyInfo *common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

func (*FullValueVerifier) CompareStream

func (p *FullValueVerifier) CompareStream(oneKeyInfo *common.Key, conflictKey chan<- *common.Key,
	sourceClient, targetClient *client.RedisClient)

* In this function, I separate comparison into the following steps: * 1. compare groups info(`xinfo groups ${stream_name}`) * 2. compare all elements in stream(`xrange ${stream_name} - + count ${number}`) * 3. compare all elements in PEL(`xpending ${stream_name} ${group} - + ${number}`)

func (*FullValueVerifier) Compare_Hash_Set_SortedSet

func (p *FullValueVerifier) Compare_Hash_Set_SortedSet(oneKeyInfo *common.Key, conflictKey chan<- *common.Key, sourceValue, targetValue map[string][]byte)

func (*FullValueVerifier) Compare_List

func (p *FullValueVerifier) Compare_List(oneKeyInfo *common.Key, conflictKey chan<- *common.Key, sourceValue, targetValue [][]byte)

func (*FullValueVerifier) Compare_String

func (p *FullValueVerifier) Compare_String(oneKeyInfo *common.Key, conflictKey chan<- *common.Key, sourceValue, targetValue []byte)

func (*FullValueVerifier) VerifyOneGroupKeyInfo

func (p *FullValueVerifier) VerifyOneGroupKeyInfo(keyInfo []*common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

type IVerifier

type IVerifier interface {
	VerifyOneGroupKeyInfo(keyInfo []*common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient,
		targetClient *client.RedisClient)
}

type KeyOutlineVerifier

type KeyOutlineVerifier struct {
	VerifierBase
}

func NewKeyOutlineVerifier

func NewKeyOutlineVerifier(stat *metric.Stat, param *FullCheckParameter) *KeyOutlineVerifier

func (*KeyOutlineVerifier) FetchKeys

func (p *KeyOutlineVerifier) FetchKeys(keyInfo []*common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

func (*KeyOutlineVerifier) VerifyOneGroupKeyInfo

func (p *KeyOutlineVerifier) VerifyOneGroupKeyInfo(keyInfo []*common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

type ValueOutlineVerifier

type ValueOutlineVerifier struct {
	VerifierBase
}

func NewValueOutlineVerifier

func NewValueOutlineVerifier(stat *metric.Stat, param *FullCheckParameter) *ValueOutlineVerifier

func (*ValueOutlineVerifier) VerifyOneGroupKeyInfo

func (p *ValueOutlineVerifier) VerifyOneGroupKeyInfo(keyInfo []*common.Key, conflictKey chan<- *common.Key, sourceClient *client.RedisClient, targetClient *client.RedisClient)

type VerifierBase

type VerifierBase struct {
	Stat  *metric.Stat
	Param *FullCheckParameter
}

func (*VerifierBase) FetchTypeAndLen

func (p *VerifierBase) FetchTypeAndLen(keyInfo []*common.Key, sourceClient, targetClient *client.RedisClient)

func (*VerifierBase) IncrFieldStat

func (p *VerifierBase) IncrFieldStat(oneKeyInfo *common.Key, conType common.ConflictType)

func (*VerifierBase) IncrKeyStat

func (p *VerifierBase) IncrKeyStat(oneKeyInfo *common.Key)

func (*VerifierBase) RecheckTTL

func (p *VerifierBase) RecheckTTL(keyInfo []*common.Key, client *client.RedisClient)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL