mirror of
https://github.com/minio/minio
synced 2024-11-05 17:34:01 +00:00
da81c6cc27
Object names of directory objects qualified for ExpiredObjectAllVersions must be encoded appropriately before calling on deletePrefix on their erasure set. e.g., a directory object and regular objects with overlapping prefixes could lead to the expiration of regular objects, which is not the intention of ILM. ``` bucket/dir/ ---> directory object bucket/dir/obj-1 ``` When `bucket/dir/` qualifies for expiration, the current implementation would remove regular objects under the prefix `bucket/dir/`, in this case, `bucket/dir/obj-1`.
417 lines
9.3 KiB
Go
417 lines
9.3 KiB
Go
package cmd
|
|
|
|
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
|
|
|
import (
|
|
"github.com/tinylib/msgp/msgp"
|
|
)
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
func (z *DailyAllTierStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
var zb0004 uint32
|
|
zb0004, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
if (*z) == nil {
|
|
(*z) = make(DailyAllTierStats, zb0004)
|
|
} else if len((*z)) > 0 {
|
|
for key := range *z {
|
|
delete((*z), key)
|
|
}
|
|
}
|
|
var field []byte
|
|
_ = field
|
|
for zb0004 > 0 {
|
|
zb0004--
|
|
var zb0001 string
|
|
var zb0002 lastDayTierStats
|
|
zb0001, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0005 uint32
|
|
zb0005, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001)
|
|
return
|
|
}
|
|
for zb0005 > 0 {
|
|
zb0005--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "Bins":
|
|
var zb0006 uint32
|
|
zb0006, err = dc.ReadArrayHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001, "Bins")
|
|
return
|
|
}
|
|
if zb0006 != uint32(24) {
|
|
err = msgp.ArrayError{Wanted: uint32(24), Got: zb0006}
|
|
return
|
|
}
|
|
for zb0003 := range zb0002.Bins {
|
|
err = zb0002.Bins[zb0003].DecodeMsg(dc)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001, "Bins", zb0003)
|
|
return
|
|
}
|
|
}
|
|
case "UpdatedAt":
|
|
zb0002.UpdatedAt, err = dc.ReadTime()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001, "UpdatedAt")
|
|
return
|
|
}
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
(*z)[zb0001] = zb0002
|
|
}
|
|
return
|
|
}
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
func (z DailyAllTierStats) EncodeMsg(en *msgp.Writer) (err error) {
|
|
err = en.WriteMapHeader(uint32(len(z)))
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
for zb0007, zb0008 := range z {
|
|
err = en.WriteString(zb0007)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
// map header, size 2
|
|
// write "Bins"
|
|
err = en.Append(0x82, 0xa4, 0x42, 0x69, 0x6e, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteArrayHeader(uint32(24))
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0007, "Bins")
|
|
return
|
|
}
|
|
for zb0009 := range zb0008.Bins {
|
|
err = zb0008.Bins[zb0009].EncodeMsg(en)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0007, "Bins", zb0009)
|
|
return
|
|
}
|
|
}
|
|
// write "UpdatedAt"
|
|
err = en.Append(0xa9, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteTime(zb0008.UpdatedAt)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0007, "UpdatedAt")
|
|
return
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
func (z DailyAllTierStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
o = msgp.Require(b, z.Msgsize())
|
|
o = msgp.AppendMapHeader(o, uint32(len(z)))
|
|
for zb0007, zb0008 := range z {
|
|
o = msgp.AppendString(o, zb0007)
|
|
// map header, size 2
|
|
// string "Bins"
|
|
o = append(o, 0x82, 0xa4, 0x42, 0x69, 0x6e, 0x73)
|
|
o = msgp.AppendArrayHeader(o, uint32(24))
|
|
for zb0009 := range zb0008.Bins {
|
|
o, err = zb0008.Bins[zb0009].MarshalMsg(o)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0007, "Bins", zb0009)
|
|
return
|
|
}
|
|
}
|
|
// string "UpdatedAt"
|
|
o = append(o, 0xa9, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74)
|
|
o = msgp.AppendTime(o, zb0008.UpdatedAt)
|
|
}
|
|
return
|
|
}
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
func (z *DailyAllTierStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
var zb0004 uint32
|
|
zb0004, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
if (*z) == nil {
|
|
(*z) = make(DailyAllTierStats, zb0004)
|
|
} else if len((*z)) > 0 {
|
|
for key := range *z {
|
|
delete((*z), key)
|
|
}
|
|
}
|
|
var field []byte
|
|
_ = field
|
|
for zb0004 > 0 {
|
|
var zb0001 string
|
|
var zb0002 lastDayTierStats
|
|
zb0004--
|
|
zb0001, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0005 uint32
|
|
zb0005, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001)
|
|
return
|
|
}
|
|
for zb0005 > 0 {
|
|
zb0005--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "Bins":
|
|
var zb0006 uint32
|
|
zb0006, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001, "Bins")
|
|
return
|
|
}
|
|
if zb0006 != uint32(24) {
|
|
err = msgp.ArrayError{Wanted: uint32(24), Got: zb0006}
|
|
return
|
|
}
|
|
for zb0003 := range zb0002.Bins {
|
|
bts, err = zb0002.Bins[zb0003].UnmarshalMsg(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001, "Bins", zb0003)
|
|
return
|
|
}
|
|
}
|
|
case "UpdatedAt":
|
|
zb0002.UpdatedAt, bts, err = msgp.ReadTimeBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001, "UpdatedAt")
|
|
return
|
|
}
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, zb0001)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
(*z)[zb0001] = zb0002
|
|
}
|
|
o = bts
|
|
return
|
|
}
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
func (z DailyAllTierStats) Msgsize() (s int) {
|
|
s = msgp.MapHeaderSize
|
|
if z != nil {
|
|
for zb0007, zb0008 := range z {
|
|
_ = zb0008
|
|
s += msgp.StringPrefixSize + len(zb0007) + 1 + 5 + msgp.ArrayHeaderSize
|
|
for zb0009 := range zb0008.Bins {
|
|
s += zb0008.Bins[zb0009].Msgsize()
|
|
}
|
|
s += 10 + msgp.TimeSize
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
func (z *lastDayTierStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "Bins":
|
|
var zb0002 uint32
|
|
zb0002, err = dc.ReadArrayHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins")
|
|
return
|
|
}
|
|
if zb0002 != uint32(24) {
|
|
err = msgp.ArrayError{Wanted: uint32(24), Got: zb0002}
|
|
return
|
|
}
|
|
for za0001 := range z.Bins {
|
|
err = z.Bins[za0001].DecodeMsg(dc)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins", za0001)
|
|
return
|
|
}
|
|
}
|
|
case "UpdatedAt":
|
|
z.UpdatedAt, err = dc.ReadTime()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UpdatedAt")
|
|
return
|
|
}
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
func (z *lastDayTierStats) EncodeMsg(en *msgp.Writer) (err error) {
|
|
// map header, size 2
|
|
// write "Bins"
|
|
err = en.Append(0x82, 0xa4, 0x42, 0x69, 0x6e, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteArrayHeader(uint32(24))
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins")
|
|
return
|
|
}
|
|
for za0001 := range z.Bins {
|
|
err = z.Bins[za0001].EncodeMsg(en)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins", za0001)
|
|
return
|
|
}
|
|
}
|
|
// write "UpdatedAt"
|
|
err = en.Append(0xa9, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteTime(z.UpdatedAt)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UpdatedAt")
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
func (z *lastDayTierStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
o = msgp.Require(b, z.Msgsize())
|
|
// map header, size 2
|
|
// string "Bins"
|
|
o = append(o, 0x82, 0xa4, 0x42, 0x69, 0x6e, 0x73)
|
|
o = msgp.AppendArrayHeader(o, uint32(24))
|
|
for za0001 := range z.Bins {
|
|
o, err = z.Bins[za0001].MarshalMsg(o)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins", za0001)
|
|
return
|
|
}
|
|
}
|
|
// string "UpdatedAt"
|
|
o = append(o, 0xa9, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74)
|
|
o = msgp.AppendTime(o, z.UpdatedAt)
|
|
return
|
|
}
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
func (z *lastDayTierStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "Bins":
|
|
var zb0002 uint32
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins")
|
|
return
|
|
}
|
|
if zb0002 != uint32(24) {
|
|
err = msgp.ArrayError{Wanted: uint32(24), Got: zb0002}
|
|
return
|
|
}
|
|
for za0001 := range z.Bins {
|
|
bts, err = z.Bins[za0001].UnmarshalMsg(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Bins", za0001)
|
|
return
|
|
}
|
|
}
|
|
case "UpdatedAt":
|
|
z.UpdatedAt, bts, err = msgp.ReadTimeBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UpdatedAt")
|
|
return
|
|
}
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
o = bts
|
|
return
|
|
}
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
func (z *lastDayTierStats) Msgsize() (s int) {
|
|
s = 1 + 5 + msgp.ArrayHeaderSize
|
|
for za0001 := range z.Bins {
|
|
s += z.Bins[za0001].Msgsize()
|
|
}
|
|
s += 10 + msgp.TimeSize
|
|
return
|
|
}
|