satellite/internalpb: new protobuf for retain filters
Add new protobuff message to store retain filters before sending them out to storagenodes. This allows the retain filters to be generated by a separate command on a backup of the database. Change-Id: I8a2892d9d34bed1dbd6e5a7ded000dcdea7ec061
This commit is contained in:
parent
fa76dfe577
commit
4393b8a5ce
111
satellite/internalpb/gc.pb.go
Normal file
111
satellite/internalpb/gc.pb.go
Normal file
@ -0,0 +1,111 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: gc.proto
|
||||
|
||||
package internalpb
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
time "time"
|
||||
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
|
||||
_ "storj.io/common/pb"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// RetainInfo is used to pass info generated from a database backup to the live garbage collection (gc) process.
|
||||
// The live process will send it out to the storage nodes.
|
||||
type RetainInfo struct {
|
||||
CreationDate time.Time `protobuf:"bytes,1,opt,name=creation_date,json=creationDate,proto3,stdtime" json:"creation_date"`
|
||||
Filter []byte `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
|
||||
// number of pieces to retain on the node through the above bloom filter.
|
||||
PieceCount int64 `protobuf:"varint,3,opt,name=piece_count,json=pieceCount,proto3" json:"piece_count,omitempty"`
|
||||
StorageNodeId NodeID `protobuf:"bytes,4,opt,name=storage_node_id,json=storageNodeId,proto3,customtype=NodeID" json:"storage_node_id"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RetainInfo) Reset() { *m = RetainInfo{} }
|
||||
func (m *RetainInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*RetainInfo) ProtoMessage() {}
|
||||
func (*RetainInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5502b0b1493f7734, []int{0}
|
||||
}
|
||||
func (m *RetainInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RetainInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RetainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RetainInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RetainInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RetainInfo.Merge(m, src)
|
||||
}
|
||||
func (m *RetainInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_RetainInfo.Size(m)
|
||||
}
|
||||
func (m *RetainInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RetainInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RetainInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *RetainInfo) GetCreationDate() time.Time {
|
||||
if m != nil {
|
||||
return m.CreationDate
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *RetainInfo) GetFilter() []byte {
|
||||
if m != nil {
|
||||
return m.Filter
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *RetainInfo) GetPieceCount() int64 {
|
||||
if m != nil {
|
||||
return m.PieceCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RetainInfo)(nil), "satellite.gc.RetainInfo")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("gc.proto", fileDescriptor_5502b0b1493f7734) }
|
||||
|
||||
var fileDescriptor_5502b0b1493f7734 = []byte{
|
||||
// 262 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xc1, 0x4a, 0xc3, 0x40,
|
||||
0x10, 0x86, 0x5d, 0x2b, 0xa5, 0x6c, 0x53, 0x85, 0x1c, 0x24, 0xe4, 0x92, 0xa0, 0x08, 0x39, 0x6d,
|
||||
0x40, 0xc1, 0x07, 0x88, 0xbd, 0xe4, 0xe2, 0x21, 0x78, 0xf2, 0x12, 0x36, 0xc9, 0x64, 0x59, 0xd9,
|
||||
0xee, 0x84, 0xcd, 0xf4, 0x3d, 0x7c, 0xac, 0x3e, 0x83, 0x87, 0xfa, 0x2a, 0x92, 0x4d, 0xe3, 0x6d,
|
||||
0xfe, 0x7f, 0xfe, 0xf9, 0x86, 0x19, 0xbe, 0x51, 0xad, 0x18, 0x1c, 0x12, 0x86, 0xc1, 0x28, 0x09,
|
||||
0x8c, 0xd1, 0x04, 0x42, 0xb5, 0x31, 0x57, 0xa8, 0x70, 0xee, 0xc4, 0x89, 0x42, 0x54, 0x06, 0x72,
|
||||
0xaf, 0x9a, 0x63, 0x9f, 0x93, 0x3e, 0xc0, 0x48, 0xf2, 0x30, 0xcc, 0x81, 0x87, 0x13, 0xe3, 0xbc,
|
||||
0x02, 0x92, 0xda, 0x96, 0xb6, 0xc7, 0xb0, 0xe4, 0xbb, 0xd6, 0x81, 0x24, 0x8d, 0xb6, 0xee, 0x24,
|
||||
0x41, 0xc4, 0x52, 0x96, 0x6d, 0x9f, 0x63, 0x31, 0x73, 0xc4, 0xc2, 0x11, 0x1f, 0x0b, 0xa7, 0xd8,
|
||||
0x9c, 0xce, 0xc9, 0xd5, 0xf7, 0x6f, 0xc2, 0xaa, 0x60, 0x19, 0xdd, 0x4b, 0x82, 0xf0, 0x9e, 0xaf,
|
||||
0x7b, 0x6d, 0x08, 0x5c, 0x74, 0x9d, 0xb2, 0x2c, 0xa8, 0x2e, 0x2a, 0x4c, 0xf8, 0x76, 0xd0, 0xd0,
|
||||
0x42, 0xdd, 0xe2, 0xd1, 0x52, 0xb4, 0x4a, 0x59, 0xb6, 0xaa, 0xb8, 0xb7, 0xde, 0x26, 0x27, 0x7c,
|
||||
0xe5, 0x77, 0x23, 0xa1, 0x93, 0x0a, 0x6a, 0x8b, 0x1d, 0xd4, 0xba, 0x8b, 0x6e, 0x26, 0x42, 0x71,
|
||||
0x3b, 0x6d, 0xfa, 0x39, 0x27, 0xeb, 0x77, 0xec, 0xa0, 0xdc, 0x57, 0xbb, 0x4b, 0xcc, 0xcb, 0xae,
|
||||
0x78, 0xfa, 0x7c, 0x9c, 0x8c, 0x2f, 0xa1, 0x31, 0xf7, 0x45, 0xfe, 0xff, 0x96, 0x5c, 0x5b, 0x02,
|
||||
0x67, 0xa5, 0x19, 0x9a, 0x66, 0xed, 0x6f, 0x78, 0xf9, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x33, 0xcf,
|
||||
0x65, 0xaf, 0x3f, 0x01, 0x00, 0x00,
|
||||
}
|
20
satellite/internalpb/gc.proto
Normal file
20
satellite/internalpb/gc.proto
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2022 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "storj.io/storj/satellite/internalpb";
|
||||
|
||||
package satellite.gc;
|
||||
|
||||
import "gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// RetainInfo is used to pass info generated from a database backup to the live garbage collection (gc) process.
|
||||
// The live process will send it out to the storage nodes.
|
||||
message RetainInfo {
|
||||
google.protobuf.Timestamp creation_date = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
bytes filter = 2;
|
||||
// number of pieces to retain on the node through the above bloom filter.
|
||||
int64 piece_count = 3;
|
||||
bytes storage_node_id = 4 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
||||
}
|
Loading…
Reference in New Issue
Block a user