From d8206dd1eff6c943e4fdbe866249477197600a01 Mon Sep 17 00:00:00 2001 From: seokjin0414 Date: Wed, 5 Aug 2026 06:28:05 +0900 Subject: [PATCH 1/3] [rust] Fix clippy for_kv_map errors from Rust 1.97 Rust 1.97 stable flags these two loops in accumulator.rs under -D warnings, which has kept check_license_and_formatting red on main since Jul 15. Signed-off-by: seokjin0414 --- crates/fluss/src/client/write/accumulator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/fluss/src/client/write/accumulator.rs b/crates/fluss/src/client/write/accumulator.rs index ed5d31a3..07f4f4e9 100644 --- a/crates/fluss/src/client/write/accumulator.rs +++ b/crates/fluss/src/client/write/accumulator.rs @@ -877,7 +877,7 @@ impl RecordAccumulator { self.memory_limiter.close(); // Complete batches still in deques (not yet drained). for mut entry in self.write_batches.iter_mut() { - for (_bucket_id, deque) in entry.value_mut().batches.iter_mut() { + for deque in entry.value_mut().batches.values_mut() { let mut dq = deque.lock(); while let Some(batch) = dq.pop_front() { batch.complete(Err(error.clone())); @@ -928,7 +928,7 @@ impl RecordAccumulator { pub fn has_undrained(&self) -> bool { for entry in self.write_batches.iter() { - for (_, batch_deque) in entry.value().batches.iter() { + for batch_deque in entry.value().batches.values() { if !batch_deque.lock().is_empty() { return true; } From 39522dfbf718dc71677ce6ca68b8ddd5408207d1 Mon Sep 17 00:00:00 2001 From: seokjin0414 Date: Wed, 5 Aug 2026 06:28:05 +0900 Subject: [PATCH 2/3] [rust] Check in generated protobuf code and drop the protoc build requirement fluss_api.proto is static, but build.rs reran prost-build codegen on every build, forcing a system protoc onto every consumer of fluss-rs and onto most CI workflows in this repo. Check the generated proto.rs in and replace build.rs with a small gen crate plus regen.sh, following the arrow-flight layout: prost-build is a normal dependency of the gen tool, so building never invokes protoc, only regenerating does. The checked-in file is byte-identical to the previous build.rs output. Signed-off-by: seokjin0414 --- .github/workflows/build_and_test_rust.yml | 10 - .../check_license_and_formatting.yml | 5 - Cargo.lock | 8 +- Cargo.toml | 2 +- DEVELOPMENT.md | 4 +- crates/fluss/Cargo.toml | 3 - crates/fluss/build.rs | 31 - crates/fluss/gen/Cargo.toml | 33 + crates/fluss/gen/src/main.rs | 66 + crates/fluss/regen.sh | 26 + crates/fluss/src/lib.rs | 2 +- crates/fluss/src/proto/proto.rs | 1363 +++++++++++++++++ 12 files changed, 1499 insertions(+), 54 deletions(-) delete mode 100644 crates/fluss/build.rs create mode 100644 crates/fluss/gen/Cargo.toml create mode 100644 crates/fluss/gen/src/main.rs create mode 100755 crates/fluss/regen.sh create mode 100644 crates/fluss/src/proto/proto.rs diff --git a/.github/workflows/build_and_test_rust.yml b/.github/workflows/build_and_test_rust.yml index 9e60bd0c..520732a4 100644 --- a/.github/workflows/build_and_test_rust.yml +++ b/.github/workflows/build_and_test_rust.yml @@ -51,11 +51,6 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Install protoc - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Rust Cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 @@ -75,11 +70,6 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Install protoc - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Rust Cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 diff --git a/.github/workflows/check_license_and_formatting.yml b/.github/workflows/check_license_and_formatting.yml index 881af9f9..a61049f0 100644 --- a/.github/workflows/check_license_and_formatting.yml +++ b/.github/workflows/check_license_and_formatting.yml @@ -53,11 +53,6 @@ jobs: - name: Check dependency licenses (Apache-compatible) run: cargo deny check licenses - - name: Install protoc - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Rust Cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 diff --git a/Cargo.lock b/Cargo.lock index a8798faa..e1a392d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1128,7 +1128,6 @@ dependencies = [ "parking_lot", "parse-display 0.10.0", "prost", - "prost-build", "rand 0.9.3", "scopeguard", "serde", @@ -1303,6 +1302,13 @@ dependencies = [ "slab", ] +[[package]] +name = "gen" +version = "0.1.0" +dependencies = [ + "prost-build", +] + [[package]] name = "generic-array" version = "0.14.7" diff --git a/Cargo.toml b/Cargo.toml index 8f811c82..fb116d3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ keywords = ["fluss", "streaming-storage", "datalake"] [workspace] resolver = "2" -members = ["crates/fluss", "crates/fluss-test-cluster", "crates/examples", "bindings/python", "bindings/cpp", "bindings/elixir/native/fluss_nif"] +members = ["crates/fluss", "crates/fluss/gen", "crates/fluss-test-cluster", "crates/examples", "bindings/python", "bindings/cpp", "bindings/elixir/native/fluss_nif"] [workspace.dependencies] fluss = { package = "fluss-rs", version = "0.2.0", path = "crates/fluss", features = ["storage-all"] } diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a1180d6f..b35925ab 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -4,16 +4,16 @@ Welcome to the development guide of `fluss-rust`! This project builds `fluss-rus ## Pre-requisites -- protobuf - rust You can install these using your favourite package / version manager. Example installation using mise: ```bash -mise install protobuf mise install rust ``` +`protobuf` (the `protoc` compiler) is only needed when regenerating the protobuf code after changing `crates/fluss/src/proto/fluss_api.proto` (see `crates/fluss/regen.sh`). Regular builds use the checked-in `crates/fluss/src/proto/proto.rs`. + ## IDE Setup We recommend [RustRover](https://www.jetbrains.com/rust/) IDE to work with fluss-rust code base. diff --git a/crates/fluss/Cargo.toml b/crates/fluss/Cargo.toml index 821ee52e..14b44ba6 100644 --- a/crates/fluss/Cargo.toml +++ b/crates/fluss/Cargo.toml @@ -86,6 +86,3 @@ fluss-test-cluster = { path = "../fluss-test-cluster" } # workspace `full` feature set; enable it for tests so the # `last_poll_seconds_ago` ticker loop can be driven deterministically. tokio = { workspace = true, features = ["test-util"] } - -[build-dependencies] -prost-build = "0.14" diff --git a/crates/fluss/build.rs b/crates/fluss/build.rs deleted file mode 100644 index f9248c36..00000000 --- a/crates/fluss/build.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -use std::io::Result; - -fn main() -> Result<()> { - let mut config = prost_build::Config::new(); - config.bytes([ - ".proto.PbProduceLogReqForBucket.records", - ".proto.PbPutKvReqForBucket.records", - ".proto.PbLookupReqForBucket.keys", - ".proto.PbPrefixLookupReqForBucket.keys", - ".proto.ScanKvResponse.records", - ]); - config.compile_protos(&["src/proto/fluss_api.proto"], &["src/proto"])?; - Ok(()) -} diff --git a/crates/fluss/gen/Cargo.toml b/crates/fluss/gen/Cargo.toml new file mode 100644 index 00000000..adb77eae --- /dev/null +++ b/crates/fluss/gen/Cargo.toml @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[package] +name = "gen" +description = "Code generation for fluss-rs" +version = "0.1.0" +edition = { workspace = true } +rust-version = { workspace = true } +authors = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +license = { workspace = true } +publish = false + +[dependencies] +# Pin the prost-build version so regenerating does not churn the checked-in +# src/proto/proto.rs. Bump deliberately, then rerun ../regen.sh. +prost-build = "0.14.3" diff --git a/crates/fluss/gen/src/main.rs b/crates/fluss/gen/src/main.rs new file mode 100644 index 00000000..f81d5f85 --- /dev/null +++ b/crates/fluss/gen/src/main.rs @@ -0,0 +1,66 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::error::Error; +use std::fs; +use std::path::Path; + +const HEADER: &str = "\ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// \"License\"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// This file was generated from src/proto/fluss_api.proto by crates/fluss/regen.sh, +// and should not be edited by hand. + +"; + +fn main() -> Result<(), Box> { + let fluss_dir = Path::new(env!("CARGO_MANIFEST_DIR")) + .parent() + .ok_or("the gen crate must live inside crates/fluss")?; + let proto_dir = fluss_dir.join("src/proto"); + + let mut config = prost_build::Config::new(); + config.bytes([ + ".proto.PbProduceLogReqForBucket.records", + ".proto.PbPutKvReqForBucket.records", + ".proto.PbLookupReqForBucket.keys", + ".proto.PbPrefixLookupReqForBucket.keys", + ".proto.ScanKvResponse.records", + ]); + config.out_dir(&proto_dir); + config.compile_protos(&[proto_dir.join("fluss_api.proto")], &[&proto_dir])?; + + let generated_path = proto_dir.join("proto.rs"); + let generated = fs::read_to_string(&generated_path)?; + fs::write(&generated_path, format!("{HEADER}{generated}"))?; + Ok(()) +} diff --git a/crates/fluss/regen.sh b/crates/fluss/regen.sh new file mode 100755 index 00000000..3418f073 --- /dev/null +++ b/crates/fluss/regen.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Regenerates src/proto/proto.rs from src/proto/fluss_api.proto. +# Requires protoc on PATH (or the PROTOC env var pointing at a protoc binary). + +set -euo pipefail + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +cd "$SCRIPT_DIR" && cargo run --manifest-path gen/Cargo.toml diff --git a/crates/fluss/src/lib.rs b/crates/fluss/src/lib.rs index 62d4c57d..edc29a7a 100644 --- a/crates/fluss/src/lib.rs +++ b/crates/fluss/src/lib.rs @@ -149,5 +149,5 @@ pub type BucketId = i32; pub(crate) mod proto { // Generated; not every 1.x message is wired up to a caller yet. #![allow(dead_code)] - include!(concat!(env!("OUT_DIR"), "/proto.rs")); + include!("proto/proto.rs"); } diff --git a/crates/fluss/src/proto/proto.rs b/crates/fluss/src/proto/proto.rs new file mode 100644 index 00000000..f02a6506 --- /dev/null +++ b/crates/fluss/src/proto/proto.rs @@ -0,0 +1,1363 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// This file was generated from src/proto/fluss_api.proto by crates/fluss/regen.sh, +// and should not be edited by hand. + +// This file is @generated by prost-build. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ErrorResponse { + #[prost(int32, required, tag = "1")] + pub error_code: i32, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +/// api versions request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ApiVersionsRequest { + #[prost(string, required, tag = "1")] + pub client_software_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub client_software_version: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ApiVersionsResponse { + #[prost(message, repeated, tag = "1")] + pub api_versions: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "2")] + pub server_type: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbApiVersion { + #[prost(int32, required, tag = "1")] + pub api_key: i32, + #[prost(int32, required, tag = "2")] + pub min_version: i32, + #[prost(int32, required, tag = "3")] + pub max_version: i32, +} +/// metadata request and response, request send from client to each server. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetadataRequest { + #[prost(message, repeated, tag = "1")] + pub table_path: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub partitions_path: ::prost::alloc::vec::Vec, + /// note: currently, we assume the partition ids must belong to the table_paths in the + /// metadata request + /// todo: we won't need the assumption after we introduce metadata cache in server + #[prost(int64, repeated, tag = "3")] + pub partitions_id: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetadataResponse { + #[prost(message, optional, tag = "1")] + pub coordinator_server: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub tablet_servers: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub table_metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub partition_metadata: ::prost::alloc::vec::Vec, +} +/// produce log request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProduceLogRequest { + #[prost(int32, required, tag = "1")] + pub acks: i32, + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int32, required, tag = "3")] + pub timeout_ms: i32, + #[prost(message, repeated, tag = "4")] + pub buckets_req: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProduceLogResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// --------------- Inner classes ---------------- +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTablePath { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub table_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPhysicalTablePath { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub table_name: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +/// For MetadataResponse, host and port are still used for all versions. +/// For UpdateMetadataRequest, +/// * versions <= 0.6: host and port are used. +/// * versions >= 0.7: listeners is used to replace host and port. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbServerNode { + #[prost(int32, required, tag = "1")] + pub node_id: i32, + #[prost(string, required, tag = "2")] + pub host: ::prost::alloc::string::String, + #[prost(int32, required, tag = "3")] + pub port: i32, + #[prost(string, optional, tag = "4")] + pub listeners: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub rack: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbTableMetadata { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int32, required, tag = "3")] + pub schema_id: i32, + #[prost(bytes = "vec", required, tag = "4")] + pub table_json: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub bucket_metadata: ::prost::alloc::vec::Vec, + #[prost(int64, required, tag = "6")] + pub created_time: i64, + #[prost(int64, required, tag = "7")] + pub modified_time: i64, + #[prost(string, optional, tag = "8")] + pub remote_data_dir: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPartitionMetadata { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + /// the partition name and id for the partition + #[prost(string, required, tag = "2")] + pub partition_name: ::prost::alloc::string::String, + #[prost(int64, required, tag = "3")] + pub partition_id: i64, + #[prost(message, repeated, tag = "4")] + pub bucket_metadata: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbBucketMetadata { + #[prost(int32, required, tag = "1")] + pub bucket_id: i32, + /// optional as some time the leader may not elected yet + #[prost(int32, optional, tag = "2")] + pub leader_id: ::core::option::Option, + #[prost(int32, repeated, tag = "3")] + pub replica_id: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub leader_epoch: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbProduceLogReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", required, tag = "3")] + pub records: ::prost::bytes::Bytes, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbProduceLogRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "5")] + pub base_offset: ::core::option::Option, +} +/// put kv request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PutKvRequest { + #[prost(int32, required, tag = "1")] + pub acks: i32, + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int32, required, tag = "3")] + pub timeout_ms: i32, + /// the indexes for the columns to write, + /// if empty, means write all columns + #[prost(int32, repeated, tag = "4")] + pub target_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub buckets_req: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "6")] + pub agg_mode: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PutKvResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPutKvReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", required, tag = "3")] + pub records: ::prost::bytes::Bytes, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPutKvRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "5")] + pub log_end_offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateTableRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(bytes = "vec", required, tag = "2")] + pub table_json: ::prost::alloc::vec::Vec, + #[prost(bool, required, tag = "3")] + pub ignore_if_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateTableResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropTableRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropTableResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct TableExistsRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct TableExistsResponse { + #[prost(bool, required, tag = "1")] + pub exists: bool, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableInfoRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableInfoResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int32, required, tag = "2")] + pub schema_id: i32, + #[prost(bytes = "vec", required, tag = "3")] + pub table_json: ::prost::alloc::vec::Vec, + #[prost(int64, required, tag = "4")] + pub created_time: i64, + #[prost(int64, required, tag = "5")] + pub modified_time: i64, + #[prost(string, optional, tag = "6")] + pub remote_data_dir: ::core::option::Option<::prost::alloc::string::String>, +} +/// get table schema request and response. Mirrors the Java RPC at api key 1011. +/// Omitting `schema_id` requests the latest schema. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableSchemaRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(int32, optional, tag = "2")] + pub schema_id: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableSchemaResponse { + #[prost(int32, required, tag = "1")] + pub schema_id: i32, + #[prost(bytes = "vec", required, tag = "2")] + pub schema_json: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListTablesRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListTablesResponse { + #[prost(string, repeated, tag = "1")] + pub table_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateDatabaseRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(bool, required, tag = "2")] + pub ignore_if_exists: bool, + #[prost(bytes = "vec", optional, tag = "3")] + pub database_json: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateDatabaseResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetDatabaseInfoRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetDatabaseInfoResponse { + #[prost(bytes = "vec", required, tag = "3")] + pub database_json: ::prost::alloc::vec::Vec, + #[prost(int64, required, tag = "4")] + pub created_time: i64, + #[prost(int64, required, tag = "5")] + pub modified_time: i64, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropDatabaseRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, + #[prost(bool, required, tag = "3")] + pub cascade: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropDatabaseResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DatabaseExistsRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DatabaseExistsResponse { + #[prost(bool, required, tag = "1")] + pub exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListDatabasesRequest { + #[prost(bool, optional, tag = "1")] + pub include_summary: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDatabasesResponse { + #[prost(string, repeated, tag = "1")] + pub database_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "2")] + pub database_summary: ::prost::alloc::vec::Vec, +} +/// list offsets request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListOffsetsRequest { + /// value -1 indicate the request from client. + #[prost(int32, required, tag = "1")] + pub follower_server_id: i32, + /// value can be 0,1,2 (see ListOffsetsParam for more details) + #[prost(int32, required, tag = "2")] + pub offset_type: i32, + #[prost(int64, required, tag = "3")] + pub table_id: i64, + #[prost(int64, optional, tag = "4")] + pub partition_id: ::core::option::Option, + /// it is recommended to use packed for repeated numerics to get more efficient encoding + #[prost(int32, repeated, tag = "5")] + pub bucket_id: ::prost::alloc::vec::Vec, + #[prost(int64, optional, tag = "6")] + pub start_timestamp: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOffsetsResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// fetch log request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchLogRequest { + /// value -1 indicate the request from client. + #[prost(int32, required, tag = "1")] + pub follower_server_id: i32, + #[prost(int32, required, tag = "2")] + pub max_bytes: i32, + #[prost(message, repeated, tag = "3")] + pub tables_req: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub max_wait_ms: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub min_bytes: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchLogResponse { + #[prost(message, repeated, tag = "1")] + pub tables_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPredicate { + #[prost(int32, required, tag = "1")] + pub r#type: i32, + #[prost(message, optional, tag = "2")] + pub leaf: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub compound: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLeafPredicate { + #[prost(int32, required, tag = "1")] + pub function: i32, + #[prost(int32, required, tag = "2")] + pub field_id: i32, + #[prost(message, repeated, tag = "3")] + pub literals: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbCompoundPredicate { + #[prost(int32, required, tag = "1")] + pub function: i32, + #[prost(message, repeated, tag = "2")] + pub children: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLiteralValue { + #[prost(int32, required, tag = "1")] + pub literal_type: i32, + #[prost(bool, required, tag = "2")] + pub is_null: bool, + #[prost(bool, optional, tag = "3")] + pub boolean_value: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub int_value: ::core::option::Option, + #[prost(int64, optional, tag = "5")] + pub bigint_value: ::core::option::Option, + #[prost(float, optional, tag = "6")] + pub float_value: ::core::option::Option, + #[prost(double, optional, tag = "7")] + pub double_value: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub string_value: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub binary_value: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(int64, optional, tag = "10")] + pub decimal_value: ::core::option::Option, + #[prost(int64, optional, tag = "11")] + pub timestamp_millis_value: ::core::option::Option, + #[prost(int32, optional, tag = "12")] + pub timestamp_nano_of_millis_value: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "13")] + pub decimal_bytes: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbFetchLogReqForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(bool, required, tag = "2")] + pub projection_pushdown_enabled: bool, + #[prost(int32, repeated, tag = "3")] + pub projected_fields: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub buckets_req: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "5")] + pub filter_predicate: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub filter_schema_id: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbFetchLogReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + /// TODO leader epoch + #[prost(int64, required, tag = "3")] + pub fetch_offset: i64, + #[prost(int32, required, tag = "4")] + pub max_fetch_bytes: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbFetchLogRespForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbFetchLogRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "5")] + pub high_watermark: ::core::option::Option, + /// TODO now we don't introduce log start offset, but remain it in protobuf + #[prost(int64, optional, tag = "6")] + pub log_start_offset: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub remote_log_fetch_info: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "8")] + pub records: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(int64, optional, tag = "9")] + pub filtered_end_offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbRemoteLogFetchInfo { + #[prost(string, required, tag = "1")] + pub remote_log_tablet_dir: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "3")] + pub remote_log_segments: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub first_start_pos: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRemoteLogSegment { + #[prost(string, required, tag = "1")] + pub remote_log_segment_id: ::prost::alloc::string::String, + #[prost(int64, required, tag = "2")] + pub remote_log_start_offset: i64, + #[prost(int64, required, tag = "3")] + pub remote_log_end_offset: i64, + #[prost(int32, required, tag = "4")] + pub segment_size_in_bytes: i32, + #[prost(int64, optional, tag = "5")] + pub max_timestamp: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbListOffsetsRespForBucket { + #[prost(int32, required, tag = "1")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "4")] + pub offset: ::core::option::Option, +} +/// fetch latest lake snapshot +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetLatestLakeSnapshotRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLatestLakeSnapshotResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, required, tag = "2")] + pub snapshot_id: i64, + #[prost(message, repeated, tag = "3")] + pub bucket_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLakeSnapshotForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "3")] + pub log_offset: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbKeyValue { + #[prost(string, required, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub value: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetFileSystemSecurityTokenRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetFileSystemSecurityTokenResponse { + #[prost(string, required, tag = "1")] + pub schema: ::prost::alloc::string::String, + #[prost(bytes = "vec", required, tag = "2")] + pub token: ::prost::alloc::vec::Vec, + #[prost(int64, optional, tag = "3")] + pub expiration_time: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub addition_info: ::prost::alloc::vec::Vec, +} +/// lookup request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LookupRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag = "3")] + pub insert_if_not_exists: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub acks: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub timeout_ms: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LookupResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLookupReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", repeated, tag = "3")] + pub keys: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLookupRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "5")] + pub values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbValue { + #[prost(bytes = "vec", optional, tag = "1")] + pub values: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// prefix lookup request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrefixLookupRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrefixLookupResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPrefixLookupReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", repeated, tag = "3")] + pub keys: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPrefixLookupRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "5")] + pub value_lists: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbValueList { + #[prost(bytes = "vec", repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPartitionSpec { + #[prost(message, repeated, tag = "1")] + pub partition_key_values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPartitionInfo { + #[prost(int64, required, tag = "1")] + pub partition_id: i64, + #[prost(message, required, tag = "2")] + pub partition_spec: PbPartitionSpec, + #[prost(string, optional, tag = "3")] + pub remote_data_dir: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPartitionInfosRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(message, optional, tag = "2")] + pub partial_partition_spec: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPartitionInfosResponse { + #[prost(message, repeated, tag = "1")] + pub partitions_info: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatePartitionRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(message, required, tag = "2")] + pub partition_spec: PbPartitionSpec, + #[prost(bool, required, tag = "3")] + pub ignore_if_not_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreatePartitionResponse {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DropPartitionRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(message, required, tag = "2")] + pub partition_spec: PbPartitionSpec, + #[prost(bool, required, tag = "3")] + pub ignore_if_not_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropPartitionResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AuthenticateRequest { + #[prost(string, required, tag = "1")] + pub protocol: ::prost::alloc::string::String, + #[prost(bytes = "vec", required, tag = "2")] + pub token: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AuthenticateResponse { + #[prost(bytes = "vec", optional, tag = "1")] + pub challenge: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// limit scan request and response +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct LimitScanRequest { + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int64, optional, tag = "3")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "4")] + pub bucket_id: i32, + #[prost(int32, required, tag = "5")] + pub limit: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct LimitScanResponse { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + /// flag to indicate the table type + #[prost(bool, optional, tag = "3")] + pub is_log_table: ::core::option::Option, + /// LogRecordBatch if is_log_table is true, otherwise KvRecordBatch + #[prost(bytes = "vec", optional, tag = "4")] + pub records: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// init writer request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitWriterRequest { + #[prost(message, repeated, tag = "1")] + pub table_path: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct InitWriterResponse { + #[prost(int64, required, tag = "1")] + pub writer_id: i64, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDatabaseSummary { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(int64, required, tag = "2")] + pub created_time: i64, + #[prost(int32, required, tag = "3")] + pub table_count: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterDatabaseRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, + #[prost(message, repeated, tag = "3")] + pub config_changes: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "4")] + pub comment: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AlterDatabaseResponse {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterTableRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, + #[prost(message, repeated, tag = "3")] + pub config_changes: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub add_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub drop_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "6")] + pub rename_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "7")] + pub modify_columns: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AlterTableResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAlterConfig { + #[prost(string, required, tag = "1")] + pub config_key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub config_value: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, required, tag = "3")] + pub op_type: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAddColumn { + #[prost(string, required, tag = "1")] + pub column_name: ::prost::alloc::string::String, + #[prost(bytes = "vec", required, tag = "2")] + pub data_type_json: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub comment: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, required, tag = "4")] + pub column_position_type: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDropColumn { + #[prost(string, required, tag = "1")] + pub column_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRenameColumn { + #[prost(string, required, tag = "1")] + pub old_column_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub new_column_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbModifyColumn { + #[prost(string, required, tag = "1")] + pub column_name: ::prost::alloc::string::String, + #[prost(bytes = "vec", optional, tag = "2")] + pub data_type_json: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "3")] + pub comment: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "4")] + pub column_position_type: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTableStatsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, tag = "3")] + pub target_columns: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTableStatsResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTableStatsReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTableStatsRespForBucket { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "3")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "4")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "5")] + pub row_count: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetLatestKvSnapshotsRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(string, optional, tag = "2")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLatestKvSnapshotsResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub latest_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbKvSnapshot { + #[prost(int32, required, tag = "1")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "2")] + pub snapshot_id: ::core::option::Option, + #[prost(int64, optional, tag = "3")] + pub log_offset: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetKvSnapshotMetadataRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(int64, required, tag = "4")] + pub snapshot_id: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetKvSnapshotMetadataResponse { + #[prost(int64, required, tag = "1")] + pub log_offset: i64, + #[prost(message, repeated, tag = "2")] + pub snapshot_files: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRemotePathAndLocalFile { + #[prost(string, required, tag = "1")] + pub remote_path: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub local_file_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AcquireKvSnapshotLeaseRequest { + #[prost(string, required, tag = "1")] + pub lease_id: ::prost::alloc::string::String, + #[prost(int64, required, tag = "2")] + pub lease_duration_ms: i64, + #[prost(message, repeated, tag = "3")] + pub snapshots_to_lease: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AcquireKvSnapshotLeaseResponse { + #[prost(message, repeated, tag = "1")] + pub unavailable_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbKvSnapshotLeaseForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub bucket_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbKvSnapshotLeaseForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int64, required, tag = "3")] + pub snapshot_id: i64, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetLakeSnapshotRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(int64, optional, tag = "2")] + pub snapshot_id: ::core::option::Option, + #[prost(bool, optional, tag = "3")] + pub readable: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLakeSnapshotResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, required, tag = "2")] + pub snapshot_id: i64, + #[prost(message, repeated, tag = "3")] + pub bucket_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAclInfo { + #[prost(string, required, tag = "1")] + pub resource_name: ::prost::alloc::string::String, + #[prost(int32, required, tag = "2")] + pub resource_type: i32, + #[prost(string, required, tag = "3")] + pub principal_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "4")] + pub principal_type: ::prost::alloc::string::String, + #[prost(string, required, tag = "5")] + pub host: ::prost::alloc::string::String, + #[prost(int32, required, tag = "6")] + pub operation_type: i32, + #[prost(int32, required, tag = "7")] + pub permission_type: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAclFilter { + #[prost(string, optional, tag = "1")] + pub resource_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, required, tag = "2")] + pub resource_type: i32, + #[prost(string, optional, tag = "3")] + pub principal_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub principal_type: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub host: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, required, tag = "6")] + pub operation_type: i32, + #[prost(int32, required, tag = "7")] + pub permission_type: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbCreateAclRespInfo { + #[prost(message, required, tag = "1")] + pub acl: PbAclInfo, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbDropAclsFilterResult { + #[prost(message, repeated, tag = "1")] + pub matching_acls: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDropAclsMatchingAcl { + #[prost(message, required, tag = "1")] + pub acl: PbAclInfo, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListAclsRequest { + #[prost(message, required, tag = "1")] + pub acl_filter: PbAclFilter, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAclsResponse { + #[prost(message, repeated, tag = "1")] + pub acl: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateAclsRequest { + #[prost(message, repeated, tag = "1")] + pub acl: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateAclsResponse { + #[prost(message, repeated, tag = "1")] + pub acl_res: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DropAclsRequest { + #[prost(message, repeated, tag = "1")] + pub acl_filter: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DropAclsResponse { + #[prost(message, repeated, tag = "1")] + pub filter_results: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDescribeConfig { + #[prost(string, required, tag = "1")] + pub config_key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub config_value: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, required, tag = "3")] + pub config_source: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DescribeClusterConfigsRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DescribeClusterConfigsResponse { + #[prost(message, repeated, tag = "1")] + pub configs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterClusterConfigsRequest { + #[prost(message, repeated, tag = "1")] + pub alter_configs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AlterClusterConfigsResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AddServerTagRequest { + #[prost(int32, repeated, tag = "1")] + pub server_ids: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "2")] + pub server_tag: i32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AddServerTagResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RemoveServerTagRequest { + #[prost(int32, repeated, tag = "1")] + pub server_ids: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "2")] + pub server_tag: i32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RemoveServerTagResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RebalanceRequest { + #[prost(int32, repeated, tag = "1")] + pub goals: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RebalanceResponse { + #[prost(string, required, tag = "1")] + pub rebalance_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListRebalanceProgressRequest { + #[prost(string, optional, tag = "1")] + pub rebalance_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRebalanceProgressResponse { + #[prost(string, optional, tag = "1")] + pub rebalance_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "2")] + pub rebalance_status: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub table_progress: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbRebalanceProgressForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_progress: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRebalanceProgressForBucket { + #[prost(message, required, tag = "1")] + pub rebalance_plan: PbRebalancePlanForBucket, + #[prost(int32, required, tag = "2")] + pub rebalance_status: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRebalancePlanForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub original_leader: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub new_leader: ::core::option::Option, + #[prost(int32, repeated, tag = "5")] + pub original_replicas: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, tag = "6")] + pub new_replicas: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CancelRebalanceRequest { + #[prost(string, optional, tag = "1")] + pub rebalance_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CancelRebalanceResponse {} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbBucketOffset { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "4")] + pub log_end_offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbProducerTableOffsets { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub bucket_offsets: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterProducerOffsetsRequest { + #[prost(string, required, tag = "1")] + pub producer_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub table_offsets: ::prost::alloc::vec::Vec, + #[prost(int64, optional, tag = "3")] + pub ttl_ms: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RegisterProducerOffsetsResponse { + #[prost(int32, optional, tag = "1")] + pub result: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetProducerOffsetsRequest { + #[prost(string, required, tag = "1")] + pub producer_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProducerOffsetsResponse { + #[prost(string, optional, tag = "1")] + pub producer_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "2")] + pub expiration_time: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub table_offsets: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteProducerOffsetsRequest { + #[prost(string, required, tag = "1")] + pub producer_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteProducerOffsetsResponse {} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTableBucket { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReleaseKvSnapshotLeaseRequest { + #[prost(string, required, tag = "1")] + pub lease_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub buckets_to_release: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ReleaseKvSnapshotLeaseResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropKvSnapshotLeaseRequest { + #[prost(string, required, tag = "1")] + pub lease_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropKvSnapshotLeaseResponse {} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbScanReqForBucket { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "4")] + pub limit: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ScanKvRequest { + #[prost(bytes = "vec", optional, tag = "1")] + pub scanner_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "2")] + pub bucket_scan_req: ::core::option::Option, + #[prost(int32, optional, tag = "3")] + pub call_seq_id: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub batch_size_bytes: ::core::option::Option, + #[prost(bool, optional, tag = "5")] + pub close_scanner: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ScanKvResponse { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "3")] + pub scanner_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(bool, optional, tag = "4")] + pub has_more_results: ::core::option::Option, + #[prost(bytes = "bytes", optional, tag = "5")] + pub records: ::core::option::Option<::prost::bytes::Bytes>, + #[prost(int64, optional, tag = "6")] + pub log_offset: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetClusterHealthRequest {} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetClusterHealthResponse { + #[prost(int32, required, tag = "1")] + pub num_replicas: i32, + #[prost(int32, required, tag = "2")] + pub in_sync_replicas: i32, + #[prost(int32, required, tag = "3")] + pub num_leader_replicas: i32, + #[prost(int32, required, tag = "4")] + pub active_leader_replicas: i32, + #[prost(int32, required, tag = "5")] + pub status: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRemoteLogManifestEntry { + #[prost(message, required, tag = "1")] + pub table_bucket: PbTableBucket, + #[prost(string, required, tag = "2")] + pub remote_log_manifest_path: ::prost::alloc::string::String, + #[prost(int64, required, tag = "3")] + pub remote_log_end_offset: i64, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListRemoteLogManifestsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRemoteLogManifestsResponse { + #[prost(message, repeated, tag = "1")] + pub manifests: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListKvSnapshotsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListKvSnapshotsResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub active_snapshots: ::prost::alloc::vec::Vec, +} From 755a1bda67e9175c244bf7ef530922efd819b6bd Mon Sep 17 00:00:00 2001 From: seokjin0414 Date: Wed, 5 Aug 2026 09:51:37 +0900 Subject: [PATCH 3/3] [ci] Verify the checked-in protobuf code stays in sync Regenerates src/proto/proto.rs in CI and fails if the result differs from the checked-in file, so proto edits cannot land without rerunning regen.sh. The output is deterministic: prost-build is version-locked through Cargo.lock, and the generated code is byte-identical across protoc 27.1, 29.3 and 35.1. Signed-off-by: seokjin0414 --- .github/workflows/build_and_test_rust.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build_and_test_rust.yml b/.github/workflows/build_and_test_rust.yml index 520732a4..353a7761 100644 --- a/.github/workflows/build_and_test_rust.yml +++ b/.github/workflows/build_and_test_rust.yml @@ -78,3 +78,23 @@ jobs: env: RUST_LOG: DEBUG RUST_BACKTRACE: full + + proto-up-to-date: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install protoc + uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Rust Cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + + - name: Regenerate protobuf code + run: ./crates/fluss/regen.sh + + - name: Verify the checked-in code is up to date + run: git diff --exit-code