twophase

package
v0.0.0-...-5782b8f Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const MAXPROPOSABLEINST = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptResponsesRPC

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

type AcceptedValueHandler

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

type ChosenUniqueQ

type ChosenUniqueQ struct {
	*UniqueQ
	// contains filtered or unexported fields
}

func ChosenUniqueQNew

func ChosenUniqueQNew(rId int32, initLen int) *ChosenUniqueQ

func (*ChosenUniqueQ) Dequeued

func (q *ChosenUniqueQ) Dequeued(bat batching.ProposalBatch, do func()) error

func (*ChosenUniqueQ) Learn

func (q *ChosenUniqueQ) Learn(bat batching.ProposalBatch)

func (*ChosenUniqueQ) Requeue

func (q *ChosenUniqueQ) Requeue(bat batching.ProposalBatch) error

func (*ChosenUniqueQ) ShouldPropose

func (q *ChosenUniqueQ) ShouldPropose(bat batching.ProposalBatch) bool

type ClientBatchProposedHandler

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

type ClientProposalStory

type ClientProposalStory int
const (
	NotProposed ClientProposalStory = iota
	ProposedButNotChosen
	ProposedAndChosen
)

type ConcurrentFile

type ConcurrentFile struct {
	*os.File
	sync.Mutex
}

func (*ConcurrentFile) Sync

func (f *ConcurrentFile) Sync() error

func (*ConcurrentFile) Write

func (f *ConcurrentFile) Write(b []byte) (int, error)

func (*ConcurrentFile) WriteAt

func (f *ConcurrentFile) WriteAt(b []byte, off int64) (int, error)

type MappedProposersAwaitingGroup

type MappedProposersAwaitingGroup struct {
	instanceagentmapper.InstanceAgentMapper
}

func (*MappedProposersAwaitingGroup) GetGroup

func (decider *MappedProposersAwaitingGroup) GetGroup(inst int32) []int32

type MinimalMappedProposersAwaitingGroup

type MinimalMappedProposersAwaitingGroup struct {
	MinimalProposersAwaitingGroup
	MappedProposersAwaitingGroup
}

func (*MinimalMappedProposersAwaitingGroup) GetGroup

func (decider *MinimalMappedProposersAwaitingGroup) GetGroup(inst int32) []int32

type MinimalProposersAwaitingGroup

type MinimalProposersAwaitingGroup struct {
	*proposalmanager.MinimalProposersShouldMaker
	//*proposalmanager.MinimalProposersInstanceManager
	*SimpleProposersAwaitingGroup
	// contains filtered or unexported fields
}

func (*MinimalProposersAwaitingGroup) GetGroup

func (g *MinimalProposersAwaitingGroup) GetGroup(inst int32) []int32

type MyBatchLearner

type MyBatchLearner interface {
	Learn(bat batching.ProposalBatch)
}

type PrepareResponsesRPC

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

type ProposalInfo

type ProposalInfo struct {
	batching.ProposalBatch
	PrevSleeps int32
	// contains filtered or unexported fields
}

type ProposalLatencyEstimator

type ProposalLatencyEstimator struct {
}

type ProposalTuples

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

type ProposeBatchOracle

type ProposeBatchOracle interface {
	ShouldPropose(bat batching.ProposalBatch) bool
}

type ProposedClientValuesManager

ProposedClientValuesManager handles information that could affect proposed values and uses it to inform future values to be proposed

func ProposedClientValuesManagerNew

func ProposedClientValuesManagerNew(id int32, tsStats *stats.TimeseriesStats, doStats bool, q Queueing) ProposedClientValuesManager

type ProposedObserver

type ProposedObserver interface {
	ObserveProposed(proposed batching.ProposalBatch)
}

type ProposerGroupGetter

type ProposerGroupGetter interface {
	GetGroup(inst int32) []int32 // change to map of int32[]struct?
}
type AwaitingGroup interface {
	GetAwaitingGroup(inst int32) []int32
}

type ProposingChosenUniqueQ

type ProposingChosenUniqueQ struct {
	*ChosenUniqueQ
	// contains filtered or unexported fields
}

func ProposingChosenUniqueueQNew

func ProposingChosenUniqueueQNew(rId int32, initLen int) *ProposingChosenUniqueQ

func (*ProposingChosenUniqueQ) Dequeued

func (q *ProposingChosenUniqueQ) Dequeued(bat batching.ProposalBatch, onSuccess func()) error

func (*ProposingChosenUniqueQ) Learn

func (*ProposingChosenUniqueQ) ObserveProposed

func (q *ProposingChosenUniqueQ) ObserveProposed(bat batching.ProposalBatch)

func (*ProposingChosenUniqueQ) Requeue

func (*ProposingChosenUniqueQ) ShouldPropose

func (q *ProposingChosenUniqueQ) ShouldPropose(bat batching.ProposalBatch) bool

type ProposingSeveralChosenUniqueQ

type ProposingSeveralChosenUniqueQ struct {
	*ChosenUniqueQ
	// contains filtered or unexported fields
}

func ProposingSeveralChosenUniqueQNew

func ProposingSeveralChosenUniqueQNew(rId int32, initLen int, proposingCopies int32) *ProposingSeveralChosenUniqueQ

func (*ProposingSeveralChosenUniqueQ) Dequeued

func (q *ProposingSeveralChosenUniqueQ) Dequeued(bat batching.ProposalBatch, onSuccess func()) error

func (*ProposingSeveralChosenUniqueQ) ObserveProposed

func (q *ProposingSeveralChosenUniqueQ) ObserveProposed(bat batching.ProposalBatch)

func (*ProposingSeveralChosenUniqueQ) Requeue

func (*ProposingSeveralChosenUniqueQ) ShouldPropose

type Queueing

type Queueing interface {
	Requeueing
	GetHead() <-chan batching.ProposalBatch
	GetTail() chan<- batching.ProposalBatch
	Dequeued(bat batching.ProposalBatch, onSuccess func()) error // func that should be called once a value is pulled from the queue in a select statement. func is what happens afterwards
}

type QueueingError

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

type Replica

func NewBaselineTwoPhaseReplica

func NewBaselineTwoPhaseReplica(id int, replica *genericsmr.Replica, durable bool, batchWait int, storageLoc string,
	maxOpenInstances int32, minBackoff int32, maxInitBackoff int32, maxBackoff int32, noopwait int32, alwaysNoop bool,
	factor float64, whoCrash int32, whenCrash time.Duration, howlongCrash time.Duration, emulatedSS bool,
	emulatedWriteTime time.Duration, catchupBatchSize int32, timeout time.Duration, group1Size int, flushCommit bool,
	softFac bool, doStats bool, statsParentLoc string, commitCatchup bool, deadTime int32, batchSize int,
	constBackoff bool, requeueOnPreempt bool, tsStatsFilename string, instStatsFilename string,
	propsStatsFilename string, sendProposerState bool, proactivePreemptOnNewB bool, batchingAcceptor bool,
	maxAccBatchWait time.Duration, sendPreparesToAllAcceptors bool, minimalProposers bool, timeBasedBallots bool,
	mappedProposers bool, dynamicMappedProposers bool, bcastAcceptance bool, mappedProposersNum int32,
	instsToOpenPerBatch int32, doEager bool, sendFastestQrm bool, useGridQrms bool, minimalAcceptors bool,
	minimalAcceptorNegatives bool, prewriteAcceptor bool, doPatientProposals bool, sendFastestAccQrm bool, forwardInduction bool,
	q1 bool, bcastCommit bool, nopreempt bool, pam bool, pamloc string, syncaceptor bool, disklessNOOP bool) *Replica

func (*Replica) BatchingEnabled

func (r *Replica) BatchingEnabled() bool

func (*Replica) BeginWaitingForClientProposals

func (r *Replica) BeginWaitingForClientProposals(inst int32, pbk *proposalmanager.PBK)

func (*Replica) CloseUp

func (r *Replica) CloseUp()

func (*Replica) GotPromisesFromAllInGroup

func (r *Replica) GotPromisesFromAllInGroup(instance int32, ballot stdpaxosproto.Ballot) bool

func (*Replica) HandlePrepareReply

func (r *Replica) HandlePrepareReply(preply *stdpaxosproto.PrepareReply)

func (*Replica) HandlePromise

func (r *Replica) HandlePromise(preply *stdpaxosproto.PrepareReply)

type Requeueing

type Requeueing interface {
	Requeue(bat batching.ProposalBatch) error
}

type SimpleBatchManager

type SimpleBatchManager struct {
	Requeueing
	// contains filtered or unexported fields
}

type SimpleProposersAwaitingGroup

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

func SimpleProposersAwaitingGroupGetterNew

func SimpleProposersAwaitingGroupGetterNew(aids []int32) *SimpleProposersAwaitingGroup

func (*SimpleProposersAwaitingGroup) GetGroup

func (g *SimpleProposersAwaitingGroup) GetGroup(inst int32) []int32

type TimeoutInfo

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

type UniqueQ

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

func UniqueQNew

func UniqueQNew(rId int32, initLen int) *UniqueQ

func (*UniqueQ) Dequeued

func (q *UniqueQ) Dequeued(bat batching.ProposalBatch, do func()) error

func (*UniqueQ) GetHead

func (q *UniqueQ) GetHead() <-chan batching.ProposalBatch

func (*UniqueQ) GetTail

func (q *UniqueQ) GetTail() chan<- batching.ProposalBatch

func (*UniqueQ) Requeue

func (q *UniqueQ) Requeue(bat batching.ProposalBatch) error

func (*UniqueQ) ShouldPropose

func (q *UniqueQ) ShouldPropose(bat batching.ProposalBatch) bool

type ValueChosenHandler

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

type ValuePreemptedHandler

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

type ValueSelector

type ValueSelector interface {
	LearnOfBallotValue(inst int32, ballot stdpaxosproto.Ballot, cmd []*state.Command, whose int32, from int32)
	LearnOfBallotAccepted(inst int32, ballot stdpaxosproto.Ballot, cmd []*state.Command, whose int32, from int32)
	ProposingClientValue(inst int32, batch batching.ProposalBatch)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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