Skip to content

Commit

Permalink
resolve the conflict
Browse files Browse the repository at this point in the history
Signed-off-by: zyguan <zhongyangguan@gmail.com>
  • Loading branch information
zyguan committed Feb 13, 2023
1 parent 6f772eb commit e14b953
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1322,51 +1322,11 @@ type SessionVars struct {

// StoreBatchSize indicates the batch size limit of store batch, set this field to 0 to disable store batch.
StoreBatchSize int
<<<<<<< HEAD
=======

// shardRand is used by TxnCtx, for the GetCurrentShard() method.
shardRand *rand.Rand

// Resource group name
ResourceGroupName string

// ProtectedTSList holds a list of timestamps that should delay GC.
ProtectedTSList protectedTSList
}

// planReplayerSessionFinishedTaskKeyLen is used to control the max size for the finished plan replayer task key in session
// in order to control the used memory
const planReplayerSessionFinishedTaskKeyLen = 128

// AddPlanReplayerFinishedTaskKey record finished task key in session
func (s *SessionVars) AddPlanReplayerFinishedTaskKey(key replayer.PlanReplayerTaskKey) {
if len(s.PlanReplayerFinishedTaskKey) >= planReplayerSessionFinishedTaskKeyLen {
s.initializePlanReplayerFinishedTaskKey()
}
s.PlanReplayerFinishedTaskKey[key] = struct{}{}
}

func (s *SessionVars) initializePlanReplayerFinishedTaskKey() {
s.PlanReplayerFinishedTaskKey = make(map[replayer.PlanReplayerTaskKey]struct{}, planReplayerSessionFinishedTaskKeyLen)
}

// CheckPlanReplayerFinishedTaskKey check whether the key exists
func (s *SessionVars) CheckPlanReplayerFinishedTaskKey(key replayer.PlanReplayerTaskKey) bool {
if s.PlanReplayerFinishedTaskKey == nil {
s.initializePlanReplayerFinishedTaskKey()
return false
}
_, ok := s.PlanReplayerFinishedTaskKey[key]
return ok
}

// IsPlanReplayerCaptureEnabled indicates whether capture or continues capture enabled
func (s *SessionVars) IsPlanReplayerCaptureEnabled() bool {
return s.EnablePlanReplayerCapture || s.EnablePlanReplayedContinuesCapture
>>>>>>> 0fe61bd41a (*: prevent cursor read from being cancelled by GC (#39950))
}

// GetNewChunkWithCapacity Attempt to request memory from the chunk pool
// thread safety
func (s *SessionVars) GetNewChunkWithCapacity(fields []*types.FieldType, capacity int, maxCachesize int, pool chunk.Allocator) *chunk.Chunk {
Expand Down

0 comments on commit e14b953

Please sign in to comment.