summaryrefslogtreecommitdiff
path: root/plugins/memory
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-24 15:51:10 +0300
committerValery Piashchynski <[email protected]>2021-06-24 15:51:10 +0300
commitfa8d2a5cc234472c06b287147fda15549ca39c05 (patch)
tree93b1f93d8b15487e9fbd8f039966553f5fd171af /plugins/memory
parenteb65f86843d2ef3829593525958a158ff4d0f56b (diff)
- Clear BOLTDB TTL memory region on Clear RPC call
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/memory')
-rw-r--r--plugins/memory/kv.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/memory/kv.go b/plugins/memory/kv.go
index 83f6630e..c13c2314 100644
--- a/plugins/memory/kv.go
+++ b/plugins/memory/kv.go
@@ -223,7 +223,7 @@ func (s *Driver) gc() {
return
case now := <-ticker.C:
// mutes needed to clear the map
- s.clearMu.Lock()
+ s.clearMu.RLock()
// check every second
s.heap.Range(func(key, value interface{}) bool {
@@ -244,7 +244,7 @@ func (s *Driver) gc() {
return true
})
- s.clearMu.Unlock()
+ s.clearMu.RUnlock()
}
}
}