mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 03:13:15 +08:00 
			
		
		
		
	fix: lru lock
This commit is contained in:
		
							parent
							
								
									de20311c4b
								
							
						
					
					
						commit
						34ced79c1b
					
				@ -102,7 +102,9 @@ func (x *LayLRU[K, V]) GetBatch(keys []K, fetch func(keys []K) (map[K]V, error))
 | 
			
		||||
		v, ok := x.core.Get(key)
 | 
			
		||||
		x.lock.Unlock()
 | 
			
		||||
		if ok {
 | 
			
		||||
			v.lock.Lock()
 | 
			
		||||
			expires, value, err1 := v.expires, v.value, v.err
 | 
			
		||||
			v.lock.Unlock()
 | 
			
		||||
			if expires != 0 && expires > time.Now().UnixMilli() {
 | 
			
		||||
				x.target.IncrGetHit()
 | 
			
		||||
				res[key] = value
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user