Skip to content

Commit

Permalink
feat: fix rollback mitigation #close
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Oct 31, 2023
1 parent f06eae1 commit cd5b538
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions couchbase/rollback_mitigation.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,11 @@ func (r *rollbackMitigation) Start() {

func (r *rollbackMitigation) Stop() {
r.closed = true
if r.observeTimer != nil {
r.observeTimer.Stop()
r.observeCloseCh <- struct{}{}
<-r.observeCloseDoneCh
}
r.configWatchTimer.Stop()

logger.Log.Info("rollback mitigation stopped")
Expand Down
2 changes: 1 addition & 1 deletion wrapper/concurrent_swiss_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (m *ConcurrentSwissMap[K, V]) ToMap() map[K]V {
result := make(map[K]V)
m.Range(func(key K, value V) bool {
result[key] = value
return false
return true
})
return result
}
Expand Down

0 comments on commit cd5b538

Please sign in to comment.