fix: Deprecate proto sequencer_id fields; add shard_id fields

pull/24376/head
Carol (Nichols || Goulding) 2022-08-19 15:05:04 -04:00
parent 698f1a47ff
commit 240946d8f5
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
6 changed files with 17 additions and 10 deletions

View File

@ -5,11 +5,13 @@ option go_package = "github.com/influxdata/iox/catalog/v1";
message ParquetFile {
reserved 7;
reserved "min_sequence_number";
reserved 2;
reserved "sequencer_id";
// the id of the file in the catalog
int64 id = 1;
// the sequencer that sequenced writes for this file
int64 sequencer_id = 2;
// the shard that sequenced writes for this file
int64 shard_id = 17;
// the namespace id
int64 namespace_id = 3;
// the table id

View File

@ -25,11 +25,13 @@ message GetParquetFilesByPartitionIdResponse {
message Partition {
reserved 5;
reserved "sort_key";
reserved 2;
reserved "sequencer_id";
// the partition id
int64 id = 1;
// the sequencer the partition is under
int64 sequencer_id = 2;
// the shard the partition is under
int64 shard_id = 7;
// the table id the partition is in
int64 table_id = 3;
// the partition key

View File

@ -13,6 +13,9 @@ message IoxMetadata {
// serialize your parquet file with this metadata structure within it)
reserved 10, 11, 12, 14;
reserved "row_count", "min_sequence_number", "time_of_first_write", "time_of_last_write";
// Renamed to shard_id
reserved 5;
reserved "sequencer_id";
// Object store ID. Used in the parquet filename. 16 bytes in big-endian order.
bytes object_store_id = 1;
@ -26,8 +29,8 @@ message IoxMetadata {
// Unique name of the namespace.
string namespace_name = 4;
// Unique sequencer ID.
int64 sequencer_id = 5;
// Unique shard ID.
int64 shard_id = 17;
// Unique table ID.
int64 table_id = 6;

View File

@ -77,7 +77,7 @@ message IngesterQueryResponseMetadata {
// Status of a partition that has unpersisted data.
//
// Note that this structure is specific to a partition (which itself is bound to a table and sequencer)!
// Note that this structure is specific to a partition (which itself is bound to a table and shard)!
message PartitionStatus {
// Max sequence number persisted
optional int64 parquet_max_sequence_number = 1;

View File

@ -36,7 +36,7 @@ pub struct IngesterQueryRequest {
impl IngesterQueryRequest {
/// Make a request to return data for a specified table for
/// all sequencers an ingester is responsible for
/// all shards an ingester is responsible for
pub fn new(
namespace: String,
table: String,

View File

@ -315,7 +315,7 @@ impl IoxMetadata {
creation_timestamp: Some(self.creation_timestamp.date_time().into()),
namespace_id: self.namespace_id.get(),
namespace_name: self.namespace_name.to_string(),
sequencer_id: self.shard_id.get(), // XXXJPG
shard_id: self.shard_id.get(),
table_id: self.table_id.get(),
table_name: self.table_name.to_string(),
partition_id: self.partition_id.get(),
@ -365,7 +365,7 @@ impl IoxMetadata {
creation_timestamp,
namespace_id: NamespaceId::new(proto_msg.namespace_id),
namespace_name,
shard_id: ShardId::new(proto_msg.sequencer_id), // XXXJPG
shard_id: ShardId::new(proto_msg.shard_id),
table_id: TableId::new(proto_msg.table_id),
table_name,
partition_id: PartitionId::new(proto_msg.partition_id),