mirror of https://github.com/minio/minio.git
				
				
				
			Fix hang in cache copyobject call (#8993)
Avoid GetObjectNInfo call from cache in CopyObjectHandler - in the case of server side copy with metadata replacement, the reader returned from cache is never consumed, but the net effect of GetObjectNInfo from cache layer, is cache holding a write lock to fill the cache. Subsequent stat operation on cache in CopyObject is not able to acquire a read lock, thus causing the hang. Fixes #8991
This commit is contained in:
		
							parent
							
								
									e4020fb41f
								
							
						
					
					
						commit
						716a52f261
					
				|  | @ -812,9 +812,6 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re | |||
| 	cpSrcDstSame := isStringEqual(pathJoin(srcBucket, srcObject), pathJoin(dstBucket, dstObject)) | ||||
| 
 | ||||
| 	getObjectNInfo := objectAPI.GetObjectNInfo | ||||
| 	if api.CacheAPI() != nil { | ||||
| 		getObjectNInfo = api.CacheAPI().GetObjectNInfo | ||||
| 	} | ||||
| 
 | ||||
| 	var lock = noLock | ||||
| 	if !cpSrcDstSame { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue