Documentation ¶
Index ¶
- func NewLocalMPPCoordinator(ctx context.Context, sctx sessionctx.Context, is infoschema.InfoSchema, ...) *localMppCoordinator
- type ExecutorWithRetry
- type RecoveryHandler
- func (m *RecoveryHandler) CanHoldResult() bool
- func (m *RecoveryHandler) Enabled() bool
- func (m *RecoveryHandler) HoldResult(resp *mppResponse)
- func (m *RecoveryHandler) NumHoldResp() int
- func (m *RecoveryHandler) PopFrontResp() (*mppResponse, error)
- func (m *RecoveryHandler) Recovery(info *RecoveryInfo) error
- func (m *RecoveryHandler) RecoveryCnt() uint32
- func (m *RecoveryHandler) ResetHolder()
- type RecoveryInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocalMPPCoordinator ¶
func NewLocalMPPCoordinator(ctx context.Context, sctx sessionctx.Context, is infoschema.InfoSchema, plan base.PhysicalPlan, planIDs []int, startTS uint64, mppQueryID kv.MPPQueryID, gatherID uint64, coordinatorAddr string, memTracker *memory.Tracker) *localMppCoordinator
NewLocalMPPCoordinator creates a new localMppCoordinator instance
Types ¶
type ExecutorWithRetry ¶
type ExecutorWithRetry struct { // Expose to let MPPGather access. KVRanges []kv.KeyRange // contains filtered or unexported fields }
ExecutorWithRetry receive mppResponse from localMppCoordinator, and tries to recovery mpp err if necessary. The abstraction layer of reading mpp resp:
- MPPGather: As part of the TiDB Volcano model executor, it is equivalent to a TableReader.
- selectResult: Decode select result(mppResponse) into chunk. Also record runtime info.
- ExecutorWithRetry: Recovery mpp err if possible and retry MPP Task.
- localMppCoordinator: Generate MPP fragment and dispatch MPPTask. And receive MPP status for better err msg and correct stats for Limit.
- mppIterator: Send or receive MPP RPC.
func NewExecutorWithRetry ¶
func NewExecutorWithRetry(ctx context.Context, sctx sessionctx.Context, parentTracker *memory.Tracker, planIDs []int, plan plannercore.PhysicalPlan, startTS uint64, queryID kv.MPPQueryID, is infoschema.InfoSchema) (*ExecutorWithRetry, error)
NewExecutorWithRetry create ExecutorWithRetry.
func (*ExecutorWithRetry) Close ¶
func (r *ExecutorWithRetry) Close() error
Close implements kv.Response interface.
func (*ExecutorWithRetry) Next ¶
func (r *ExecutorWithRetry) Next(ctx context.Context) (resp kv.ResultSubset, err error)
Next implements kv.Response interface.
type RecoveryHandler ¶
type RecoveryHandler struct {
// contains filtered or unexported fields
}
RecoveryHandler tries to recovery mpp error.
func NewRecoveryHandler ¶
func NewRecoveryHandler(useAutoScaler bool, holderCap uint64, enable bool, parent *memory.Tracker) *RecoveryHandler
NewRecoveryHandler returns new instance of RecoveryHandler.
func (*RecoveryHandler) CanHoldResult ¶
func (m *RecoveryHandler) CanHoldResult() bool
CanHoldResult tells whether we can insert intermediate results.
func (*RecoveryHandler) Enabled ¶
func (m *RecoveryHandler) Enabled() bool
Enabled return true when mpp err recovery enabled.
func (*RecoveryHandler) HoldResult ¶
func (m *RecoveryHandler) HoldResult(resp *mppResponse)
HoldResult tries to hold mpp result. You should call Enabled() and CanHoldResult() to check first.
func (*RecoveryHandler) NumHoldResp ¶
func (m *RecoveryHandler) NumHoldResp() int
NumHoldResp returns the number of resp holded.
func (*RecoveryHandler) PopFrontResp ¶
func (m *RecoveryHandler) PopFrontResp() (*mppResponse, error)
PopFrontResp pop one resp.
func (*RecoveryHandler) Recovery ¶
func (m *RecoveryHandler) Recovery(info *RecoveryInfo) error
Recovery tries to recovery error. Reasons that cannot recovery:
- Already return result to client because holder is full.
- Recovery method of this kind of error not implemented or error is not recoveryable.
- Retry time exceeds maxRecoveryCnt.
func (*RecoveryHandler) RecoveryCnt ¶
func (m *RecoveryHandler) RecoveryCnt() uint32
RecoveryCnt returns the recovery count.
func (*RecoveryHandler) ResetHolder ¶
func (m *RecoveryHandler) ResetHolder()
ResetHolder reset the dynamic data, like resps and recovery cnt. Will not touch other metadata, like enable.
type RecoveryInfo ¶
RecoveryInfo contains info that can help recovery error.