Documentation ¶
Index ¶
Constants ¶
const CheckpointCannotProceed = internal.CheckpointCannotProceed
CheckpointCannotProceed is a placeholder indicating that the Owner should not advance the global checkpoint TS just yet.
Variables ¶
This section is empty.
Functions ¶
func InitMetrics ¶
func InitMetrics(registry *prometheus.Registry)
InitMetrics registers all metrics used in scheduler
Types ¶
type Agent ¶
Agent is an interface for an object inside Processor that is responsible for receiving commands from the Owner. Ideally the processor should drive the Agent by Tick.
Note that Agent is not thread-safe
func NewAgent ¶
func NewAgent( ctx context.Context, captureID model.CaptureID, liveness *model.Liveness, messageServer *p2p.MessageServer, messageRouter p2p.MessageRouter, ownerInfoClient etcd.OwnerCaptureInfoClient, executor TableExecutor, changefeedID model.ChangeFeedID, changefeedEpoch uint64, cfg *config.SchedulerConfig, ) (Agent, error)
NewAgent returns two-phase agent.
type InfoProvider ¶
type InfoProvider internal.InfoProvider
InfoProvider is the interface to get information about the internal states of the scheduler. We need this interface so that we can provide the information through HTTP API.
type Scheduler ¶
Scheduler is an interface for scheduling tables. Since in our design, we do not record checkpoints per table, how we calculate the global watermarks (checkpoint-ts and resolved-ts) is heavily coupled with how tables are scheduled. That is why we have a scheduler interface that also reports the global watermarks.
func NewScheduler ¶
func NewScheduler( ctx context.Context, captureID model.CaptureID, changeFeedID model.ChangeFeedID, messageServer *p2p.MessageServer, messageRouter p2p.MessageRouter, ownerRevision int64, changefeedEpoch uint64, up *upstream.Upstream, cfg *config.SchedulerConfig, redoMetaManager redo.MetaManager, ) (Scheduler, error)
NewScheduler returns two-phase scheduler.
type TableExecutor ¶
type TableExecutor internal.TableExecutor
TableExecutor is an abstraction for "Processor".
This interface is so designed that it would be the least problematic to adapt the current Processor implementation to it. TODO find a way to make the semantics easier to understand.