forked from TrueCloudLab/frostfs-api-go
Revert "[#16] object: Allow set copy_number
for every placement vector"
This reverts commit e022a2b831
.
This commit is contained in:
parent
d9c5b9c90e
commit
dbcd514748
5 changed files with 8 additions and 10 deletions
|
@ -109,7 +109,7 @@ func (m *PutRequest_Body_Init) SetHeader(v *Header) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetCopiesNumber sets number of the copies to save.
|
// SetCopiesNumber sets number of the copies to save.
|
||||||
func (m *PutRequest_Body_Init) SetCopiesNumber(v []uint32) {
|
func (m *PutRequest_Body_Init) SetCopiesNumber(v uint32) {
|
||||||
m.CopiesNumber = v
|
m.CopiesNumber = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
BIN
object/grpc/service.pb.go
generated
BIN
object/grpc/service.pb.go
generated
Binary file not shown.
|
@ -516,7 +516,7 @@ func (r *PutObjectPartInit) StableMarshal(buf []byte) []byte {
|
||||||
offset += proto.NestedStructureMarshal(putReqInitObjectIDField, buf[offset:], r.id)
|
offset += proto.NestedStructureMarshal(putReqInitObjectIDField, buf[offset:], r.id)
|
||||||
offset += proto.NestedStructureMarshal(putReqInitSignatureField, buf[offset:], r.sig)
|
offset += proto.NestedStructureMarshal(putReqInitSignatureField, buf[offset:], r.sig)
|
||||||
offset += proto.NestedStructureMarshal(putReqInitHeaderField, buf[offset:], r.hdr)
|
offset += proto.NestedStructureMarshal(putReqInitHeaderField, buf[offset:], r.hdr)
|
||||||
proto.RepeatedUInt32Marshal(putReqInitCopiesNumField, buf[offset:], r.copyNum)
|
proto.UInt32Marshal(putReqInitCopiesNumField, buf[offset:], r.copyNum)
|
||||||
|
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
@ -529,9 +529,7 @@ func (r *PutObjectPartInit) StableSize() (size int) {
|
||||||
size += proto.NestedStructureSize(putReqInitObjectIDField, r.id)
|
size += proto.NestedStructureSize(putReqInitObjectIDField, r.id)
|
||||||
size += proto.NestedStructureSize(putReqInitSignatureField, r.sig)
|
size += proto.NestedStructureSize(putReqInitSignatureField, r.sig)
|
||||||
size += proto.NestedStructureSize(putReqInitHeaderField, r.hdr)
|
size += proto.NestedStructureSize(putReqInitHeaderField, r.hdr)
|
||||||
|
size += proto.UInt32Size(putReqInitCopiesNumField, r.copyNum)
|
||||||
arrSize, _ := proto.RepeatedUInt32Size(putReqInitCopiesNumField, r.copyNum)
|
|
||||||
size += arrSize
|
|
||||||
|
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,7 +216,7 @@ func GeneratePutObjectPartInit(empty bool) *object.PutObjectPartInit {
|
||||||
m := new(object.PutObjectPartInit)
|
m := new(object.PutObjectPartInit)
|
||||||
|
|
||||||
if !empty {
|
if !empty {
|
||||||
m.SetCopiesNumber([]uint32{234})
|
m.SetCopiesNumber(234)
|
||||||
m.SetObjectID(refstest.GenerateObjectID(false))
|
m.SetObjectID(refstest.GenerateObjectID(false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ type PutObjectPartInit struct {
|
||||||
|
|
||||||
hdr *Header
|
hdr *Header
|
||||||
|
|
||||||
copyNum []uint32
|
copyNum uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
type PutObjectPartChunk struct {
|
type PutObjectPartChunk struct {
|
||||||
|
@ -894,15 +894,15 @@ func (r *PutObjectPartInit) SetHeader(v *Header) {
|
||||||
r.hdr = v
|
r.hdr = v
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *PutObjectPartInit) GetCopiesNumber() []uint32 {
|
func (r *PutObjectPartInit) GetCopiesNumber() uint32 {
|
||||||
if r != nil {
|
if r != nil {
|
||||||
return r.copyNum
|
return r.copyNum
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *PutObjectPartInit) SetCopiesNumber(v []uint32) {
|
func (r *PutObjectPartInit) SetCopiesNumber(v uint32) {
|
||||||
r.copyNum = v
|
r.copyNum = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue