mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 20:20:25 +03:00
implement a safer completeMultipart implementation (#20227)
- optimize writing part.N.meta by writing both part.N
and its meta in sequence without network component.
- remove part.N.meta, part.N which were partially success
ful, in quorum loss situations during renamePart()
- allow for strict read quorum check arbitrated via ETag
for the given part number, this makes it double safer
upon final commit.
- return an appropriate error when read quorum is missing,
instead of returning InvalidPart{}, which is non-retryable
error. This kind of situation can happen when many
nodes are going offline in rotation, an example of such
a restart() behavior is statefulset updates in k8s.
fixes #20091
This commit is contained in:
@@ -494,6 +494,16 @@ type RenameFileHandlerParams struct {
|
||||
DstFilePath string `msg:"dp"`
|
||||
}
|
||||
|
||||
// RenamePartHandlerParams are parameters for RenamePartHandler.
|
||||
type RenamePartHandlerParams struct {
|
||||
DiskID string `msg:"id"`
|
||||
SrcVolume string `msg:"sv"`
|
||||
SrcFilePath string `msg:"sp"`
|
||||
DstVolume string `msg:"dv"`
|
||||
DstFilePath string `msg:"dp"`
|
||||
Meta []byte `msg:"m"`
|
||||
}
|
||||
|
||||
// ReadAllHandlerParams are parameters for ReadAllHandler.
|
||||
type ReadAllHandlerParams struct {
|
||||
DiskID string `msg:"id"`
|
||||
@@ -547,6 +557,16 @@ type ListDirResult struct {
|
||||
Entries []string `msg:"e"`
|
||||
}
|
||||
|
||||
// ReadPartsReq - send multiple part paths to read from
|
||||
type ReadPartsReq struct {
|
||||
Paths []string `msg:"p"`
|
||||
}
|
||||
|
||||
// ReadPartsResp - is the response for ReadPartsReq
|
||||
type ReadPartsResp struct {
|
||||
Infos []*ObjectPartInfo `msg:"is"`
|
||||
}
|
||||
|
||||
// DeleteBulkReq - send multiple paths in same delete request.
|
||||
type DeleteBulkReq struct {
|
||||
Paths []string `msg:"p"`
|
||||
|
||||
Reference in New Issue
Block a user