Skip to content

Commit

Permalink
statistics: remove h.mu.Lock when creating NewSessionStatsCollector (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jun 8, 2023
1 parent dd60929 commit 67bbf4d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions statistics/handle/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ func (s *SessionStatsCollector) UpdateColStatsUsage(colMap colStatsUsageMap) {

// NewSessionStatsCollector allocates a stats collector for a session.
func (h *Handle) NewSessionStatsCollector() *SessionStatsCollector {
h.mu.Lock()
defer h.mu.Unlock()

h.listHead.Lock()
defer h.listHead.Unlock()
newCollector := &SessionStatsCollector{
Expand Down Expand Up @@ -315,8 +312,6 @@ func (s *SessionIndexUsageCollector) Delete() {
// idxUsageListHead always points to an empty SessionIndexUsageCollector as a sentinel node. So we let idxUsageListHead.next
// points to new item. It's helpful to sweepIdxUsageList.
func (h *Handle) NewSessionIndexUsageCollector() *SessionIndexUsageCollector {
h.mu.Lock()
defer h.mu.Unlock()
h.idxUsageListHead.Lock()
defer h.idxUsageListHead.Unlock()
newCollector := &SessionIndexUsageCollector{
Expand Down

0 comments on commit 67bbf4d

Please sign in to comment.