From 240946d8f55df85c5b246b7beea2cee6885f9181 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Fri, 19 Aug 2022 15:05:04 -0400 Subject: [PATCH] fix: Deprecate proto sequencer_id fields; add shard_id fields --- .../protos/influxdata/iox/catalog/v1/parquet_file.proto | 6 ++++-- .../protos/influxdata/iox/catalog/v1/service.proto | 6 ++++-- .../influxdata/iox/ingester/v1/parquet_metadata.proto | 7 +++++-- .../protos/influxdata/iox/ingester/v1/query.proto | 2 +- generated_types/src/ingester.rs | 2 +- parquet_file/src/metadata.rs | 4 ++-- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/generated_types/protos/influxdata/iox/catalog/v1/parquet_file.proto b/generated_types/protos/influxdata/iox/catalog/v1/parquet_file.proto index b1c09c4481..89f2e7ac51 100644 --- a/generated_types/protos/influxdata/iox/catalog/v1/parquet_file.proto +++ b/generated_types/protos/influxdata/iox/catalog/v1/parquet_file.proto @@ -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 diff --git a/generated_types/protos/influxdata/iox/catalog/v1/service.proto b/generated_types/protos/influxdata/iox/catalog/v1/service.proto index 3a08d32903..7adfa33c7d 100644 --- a/generated_types/protos/influxdata/iox/catalog/v1/service.proto +++ b/generated_types/protos/influxdata/iox/catalog/v1/service.proto @@ -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 diff --git a/generated_types/protos/influxdata/iox/ingester/v1/parquet_metadata.proto b/generated_types/protos/influxdata/iox/ingester/v1/parquet_metadata.proto index e25ce16ea9..4c07cdca42 100644 --- a/generated_types/protos/influxdata/iox/ingester/v1/parquet_metadata.proto +++ b/generated_types/protos/influxdata/iox/ingester/v1/parquet_metadata.proto @@ -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; diff --git a/generated_types/protos/influxdata/iox/ingester/v1/query.proto b/generated_types/protos/influxdata/iox/ingester/v1/query.proto index 7f4b1c2c72..ff7cc66209 100644 --- a/generated_types/protos/influxdata/iox/ingester/v1/query.proto +++ b/generated_types/protos/influxdata/iox/ingester/v1/query.proto @@ -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; diff --git a/generated_types/src/ingester.rs b/generated_types/src/ingester.rs index 736dc7ecd0..d3c3da0ffb 100644 --- a/generated_types/src/ingester.rs +++ b/generated_types/src/ingester.rs @@ -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, diff --git a/parquet_file/src/metadata.rs b/parquet_file/src/metadata.rs index 5643611beb..93424122dc 100644 --- a/parquet_file/src/metadata.rs +++ b/parquet_file/src/metadata.rs @@ -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),