storj/satellite/internalpb/metainfo_sat.proto
Michal Niewrzal cebf255d64 satellite/metabase: adjust BeginObjectNextVersion to use pending_objects
Change is adjusting BeginObjectNextVersion to create pending object in
`pending_objects` or `objects` table depends on configuration. This is
first change to move pending objects from objects table.

General goal is to support both tables until `objects` table will be
free from pending objects. Whenever it will be needed code will be
supporting both tables at once.

To be able to decide if we need to use `pending_objects` table or
`objects` table we extend satellite stream id to keep that information
for later use.

BeginObjectExactVersion will be not adjusted because at the moment it's
used only in tests.

Part of https://github.com/storj/storj/issues/6046

Change-Id: Ibf21965f63cca5e1775469994a29f1fd1261af4e
2023-08-02 14:42:26 +00:00

48 lines
1.4 KiB
Protocol Buffer

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
syntax = "proto3";
option go_package = "storj.io/storj/satellite/internalpb";
package satellite.metainfo;
import "encryption.proto";
import "gogo.proto";
import "google/protobuf/timestamp.proto";
import "metainfo.proto";
message StreamID {
bytes bucket = 1;
bytes encrypted_object_key = 2;
int64 version = 3;
encryption.EncryptionParameters encryption_parameters = 12;
google.protobuf.Timestamp creation_date = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
google.protobuf.Timestamp expiration_date = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
bool multipart_object = 11;
bytes satellite_signature = 9;
bytes stream_id = 10;
int32 placement = 13;
// temporary field to determine if we should go with new pending_objects table or
// fallback to pending object in objects table.
bool use_pending_objects_table = 14;
}
message SegmentID {
StreamID stream_id = 1;
int32 part_number = 2;
int32 index = 3;
bytes root_piece_id = 5 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false];
repeated .metainfo.AddressedOrderLimit original_order_limits = 6;
google.protobuf.Timestamp creation_date = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
bytes satellite_signature = 8;
}