executor

package
v0.0.0-...-10178d1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DumpConflictToDB  = "db"
	DumpConflictToSDK = "sdk"
	NoDumpConflict    = "none"

	ExecuteOrdered = false

	OpInsert = 0x01
	OpUpdate = 0x02

	OplogsMaxGroupNum  = 1000
	OplogsMaxGroupSize = 12 * 1024 * 1024 // MongoDB limits 16MB
)
View Source
const MultiColumnIndexSplitter = "|"

Variables

View Source
var (
	GlobalExecutorId int32  = -1
	ThresholdVersion string = "3.2.0"
)
View Source
var ErrorsShouldSkip = map[int]string{
	61: "ShardKeyNotFound",
}

Functions

func ExactlyMatch

func ExactlyMatch(first, second interface{}) bool

func GenerateExecutorId

func GenerateExecutorId() int

func HandleDuplicated

func HandleDuplicated(collection *mgo.Collection, records []*OplogRecord, op int8)

Types

type BarrierMatrix

type BarrierMatrix struct {
	NoopMatrix
}

BarrierMatrix only split oplogs into segments. without convert stage stage.

func NewBarrierMatrix

func NewBarrierMatrix() *BarrierMatrix

type BasicWriter

type BasicWriter interface {
	// contains filtered or unexported methods
}

func NewDbWriter

func NewDbWriter(session *mgo.Session, metadata bson.M, bulkInsert bool) BasicWriter

type BatchGroupExecutor

type BatchGroupExecutor struct {

	// worker id
	ReplayerId uint32
	// mongo url
	MongoUrl string
	// tranform namespace
	NsTrans *transform.NamespaceTransform
	// contains filtered or unexported fields
}

func (*BatchGroupExecutor) Start

func (batchExecutor *BatchGroupExecutor) Start()

func (*BatchGroupExecutor) Sync

func (batchExecutor *BatchGroupExecutor) Sync(rawLogs []*oplog.PartialLog, callback func())

type BulkWriter

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

use general bulk interface such like Insert/Update/Delete to execute command

type CollisionMatrix

type CollisionMatrix interface {
	// contains filtered or unexported methods
}

type CommandWriter

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

use run_command to execute command

type Executor

type Executor struct {

	// mongo url
	MongoUrl string
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(id int, batchExecutor *BatchGroupExecutor, MongoUrl string) *Executor

type LogsGroupCombiner

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

type NoopMatrix

type NoopMatrix struct{}

type OplogRecord

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

type OplogUniqueIdentifier

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

type OplogsGroup

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

type PartialLogWithCallbak

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

type SingleWriter

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

use general single writer interface to execute command

type SnapshotDiffer

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

Jump to

Keyboard shortcuts

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