Put object client disconnect (#7824)

Fail putObject  and postpolicy in case client prematurely disconnects
Use request's context to cancel lock requests on client disconnects
This commit is contained in:
Krishna Srinivas
2019-06-28 22:09:17 -07:00
committed by kannappanr
parent edbd8709ec
commit 338e9a9be9
25 changed files with 89 additions and 73 deletions

View File

@@ -634,7 +634,7 @@ func (fs *FSObjects) CompleteMultipartUpload(ctx context.Context, bucket string,
}
// Hold write lock on the object.
destLock := fs.nsMutex.NewNSLock(bucket, object)
destLock := fs.nsMutex.NewNSLock(ctx, bucket, object)
if err = destLock.GetLock(globalObjectTimeout); err != nil {
return oi, err
}