Skip to content

Commit

Permalink
Fix lock (#2622)
Browse files Browse the repository at this point in the history
* fix:log

* fix: lock
  • Loading branch information
icey-yu committed Sep 13, 2024
1 parent 9424e3e commit 9c92fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/localcache/lru/lru_lazy.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ func (x *LayLRU[K, V]) GetBatch(keys []K, fetch func(keys []K) (map[K]V, error))
once sync.Once
)

x.lock.Lock()
res := make(map[K]V)
queries := make([]K, 0)
setVs := make(map[K]*layLruItem[V])
for _, key := range keys {
x.lock.Lock()
v, ok := x.core.Get(key)
x.lock.Unlock()
if ok {
Expand Down

0 comments on commit 9c92fbb

Please sign in to comment.