Skip to content

Commit

Permalink
MB-50006 Acquire muSnap lock before processing flushDone
Browse files Browse the repository at this point in the history
Change-Id: I6951f53a2c4eb7b68753634f27551e4472a65bd9
  • Loading branch information
varunv-cb committed Feb 11, 2022
1 parent 7f0af20 commit b247c98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions secondary/indexer/storage_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ func (s *storageMgr) handleCreateSnapshot(cmd Message) {
}()
}

s.muSnap.Lock()
defer s.muSnap.Unlock()

if snapType == common.NO_SNAP || snapType == common.NO_SNAP_OSO {
logging.Debugf("StorageMgr::handleCreateSnapshot Skip Snapshot For %v "+
"%v SnapType %v", streamId, keyspaceId, snapType)
Expand All @@ -292,9 +295,6 @@ func (s *storageMgr) handleCreateSnapshot(cmd Message) {
return
}

s.muSnap.Lock()
defer s.muSnap.Unlock()

//pass copy of maps to worker
indexInstMap := s.indexInstMap.Get()
indexPartnMap := s.indexPartnMap.Get()
Expand Down

0 comments on commit b247c98

Please sign in to comment.