Documentation ¶
Index ¶
- Constants
- type AcceptResponsesRPC
- type AcceptedValueHandler
- type ChosenUniqueQ
- type ClientBatchProposedHandler
- type ClientProposalStory
- type ConcurrentFile
- type MappedProposersAwaitingGroup
- type MinimalMappedProposersAwaitingGroup
- type MinimalProposersAwaitingGroup
- type MyBatchLearner
- type PrepareResponsesRPC
- type ProposalInfo
- type ProposalLatencyEstimator
- type ProposalTuples
- type ProposeBatchOracle
- type ProposedClientValuesManager
- type ProposedObserver
- type ProposerGroupGetter
- type ProposingChosenUniqueQ
- func (q *ProposingChosenUniqueQ) Dequeued(bat batching.ProposalBatch, onSuccess func()) error
- func (q *ProposingChosenUniqueQ) Learn(bat batching.ProposalBatch)
- func (q *ProposingChosenUniqueQ) ObserveProposed(bat batching.ProposalBatch)
- func (q *ProposingChosenUniqueQ) Requeue(bat batching.ProposalBatch) error
- func (q *ProposingChosenUniqueQ) ShouldPropose(bat batching.ProposalBatch) bool
- type ProposingSeveralChosenUniqueQ
- func (q *ProposingSeveralChosenUniqueQ) Dequeued(bat batching.ProposalBatch, onSuccess func()) error
- func (q *ProposingSeveralChosenUniqueQ) ObserveProposed(bat batching.ProposalBatch)
- func (q *ProposingSeveralChosenUniqueQ) Requeue(bat batching.ProposalBatch) error
- func (q *ProposingSeveralChosenUniqueQ) ShouldPropose(bat batching.ProposalBatch) bool
- type Queueing
- type QueueingError
- type Replica
- func (r *Replica) BatchingEnabled() bool
- func (r *Replica) BeginWaitingForClientProposals(inst int32, pbk *proposalmanager.PBK)
- func (r *Replica) CloseUp()
- func (r *Replica) GotPromisesFromAllInGroup(instance int32, ballot stdpaxosproto.Ballot) bool
- func (r *Replica) HandlePrepareReply(preply *stdpaxosproto.PrepareReply)
- func (r *Replica) HandlePromise(preply *stdpaxosproto.PrepareReply)
- type Requeueing
- type SimpleBatchManager
- type SimpleProposersAwaitingGroup
- type TimeoutInfo
- type UniqueQ
- func (q *UniqueQ) Dequeued(bat batching.ProposalBatch, do func()) error
- func (q *UniqueQ) GetHead() <-chan batching.ProposalBatch
- func (q *UniqueQ) GetTail() chan<- batching.ProposalBatch
- func (q *UniqueQ) Requeue(bat batching.ProposalBatch) error
- func (q *UniqueQ) ShouldPropose(bat batching.ProposalBatch) bool
- type ValueChosenHandler
- type ValuePreemptedHandler
- type ValueSelector
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 ¶
func (*ConcurrentFile) Sync ¶
func (f *ConcurrentFile) Sync() error
type MappedProposersAwaitingGroup ¶
type MappedProposersAwaitingGroup struct {
instanceagentmapper.InstanceAgentMapper
}
func MappedProposersAwaitingGroupNew ¶
func MappedProposersAwaitingGroupNew(mapper instanceagentmapper.InstanceAgentMapper) *MappedProposersAwaitingGroup
func (*MappedProposersAwaitingGroup) GetGroup ¶
func (decider *MappedProposersAwaitingGroup) GetGroup(inst int32) []int32
type MinimalMappedProposersAwaitingGroup ¶
type MinimalMappedProposersAwaitingGroup struct { MinimalProposersAwaitingGroup MappedProposersAwaitingGroup }
func MinimalMappedProposersAwaitingGroupNew ¶
func MinimalMappedProposersAwaitingGroupNew(minimalGroup MinimalProposersAwaitingGroup, awaitingGroup MappedProposersAwaitingGroup) *MinimalMappedProposersAwaitingGroup
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 MinimalProposersAwaitingGroupNew ¶
func MinimalProposersAwaitingGroupNew(simpleG *SimpleProposersAwaitingGroup, maker *proposalmanager.MinimalProposersShouldMaker, f int32) *MinimalProposersAwaitingGroup
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 ¶
type ProposedClientValuesManager interface { AcceptedValueHandler ValuePreemptedHandler ValueChosenHandler ClientBatchProposedHandler }
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 (q *ProposingChosenUniqueQ) Learn(bat batching.ProposalBatch)
func (*ProposingChosenUniqueQ) ObserveProposed ¶
func (q *ProposingChosenUniqueQ) ObserveProposed(bat batching.ProposalBatch)
func (*ProposingChosenUniqueQ) Requeue ¶
func (q *ProposingChosenUniqueQ) Requeue(bat batching.ProposalBatch) error
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 (q *ProposingSeveralChosenUniqueQ) Requeue(bat batching.ProposalBatch) error
func (*ProposingSeveralChosenUniqueQ) ShouldPropose ¶
func (q *ProposingSeveralChosenUniqueQ) ShouldPropose(bat batching.ProposalBatch) bool
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 ¶
type Replica struct { exec.Executor learner.Learner proposalmanager.CrtInstanceOracle ProposeBatchOracle proposalmanager.GlobalInstanceManager ProposedClientValuesManager proposalmanager.ProposerInstanceQuorumaliser proposalmanager.LearnerQuorumaliser proposalmanager.AcceptorQrmInfo Queueing *genericsmr.Replica // extends a generic Paxos replica Shutdown bool TimeseriesStats *stats.TimeseriesStats InstanceStats *stats.InstanceStats ProposalStats *stats.ProposalStats acceptor.Acceptor stablestore.StableStore PrepareResponsesRPC AcceptResponsesRPC // contains filtered or unexported fields }
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 (*Replica) BeginWaitingForClientProposals ¶
func (r *Replica) BeginWaitingForClientProposals(inst int32, pbk *proposalmanager.PBK)
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 (*UniqueQ) GetHead ¶
func (q *UniqueQ) GetHead() <-chan batching.ProposalBatch
func (*UniqueQ) GetTail ¶
func (q *UniqueQ) GetTail() chan<- batching.ProposalBatch
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) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.