mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 04:16:38 +00:00
fix(tooling): harden internode transport benchmark setup (#3037)
* refactor(config): centralize internode transport constants * fix(bench): guard all ripgrep calls behind dry-run check Move require_cmd rg and metrics collection inside the non-dry-run path so that --dry-run works on hosts without rg installed. * feat(tooling): cross-platform protoc setup for Linux and macOS Make install-protoc.sh support Linux (x86_64, aarch64) alongside macOS, and bump CI protoc from 29.3 to 33.1 to match the version required by the gproto build script. * fix(bench): record internode baseline error counts * fix(skill): correct YAML frontmatter formatting for release-version-bump * chore(ci): bump protoc version to 34.1 * fix(tooling): bump protoc 33.1 to 34.1 in install script, restore SKILL.md description --------- Co-authored-by: Henry Guo <marshawcoco@users.noreply.github.com>
This commit is contained in:
@@ -17,12 +17,14 @@ use crate::disk::{FileReader, FileWriter};
|
||||
use crate::rpc::build_auth_headers;
|
||||
use async_trait::async_trait;
|
||||
use http::{HeaderMap, HeaderValue, Method, header::CONTENT_TYPE};
|
||||
use rustfs_config::{DEFAULT_INTERNODE_DATA_TRANSPORT, ENV_RUSTFS_INTERNODE_DATA_TRANSPORT};
|
||||
use rustfs_config::{
|
||||
DEFAULT_INTERNODE_DATA_TRANSPORT, ENV_RUSTFS_INTERNODE_DATA_TRANSPORT, INTERNODE_DATA_TRANSPORT_TCP,
|
||||
KNOWN_INTERNODE_DATA_TRANSPORT_BACKENDS,
|
||||
};
|
||||
use rustfs_rio::{HttpReader, HttpWriter};
|
||||
use std::sync::{Arc, OnceLock};
|
||||
use std::time::Duration;
|
||||
|
||||
pub const INTERNODE_DATA_TRANSPORT_TCP: &str = "tcp";
|
||||
static INTERNODE_DATA_TRANSPORT: OnceLock<std::result::Result<Arc<dyn InternodeDataTransport>, String>> = OnceLock::new();
|
||||
|
||||
const READ_FILE_STREAM_PATH: &str = "/rustfs/rpc/read_file_stream";
|
||||
@@ -32,7 +34,8 @@ const CONTENT_TYPE_JSON: &str = "application/json";
|
||||
|
||||
fn unsupported_transport_message(transport: &str) -> String {
|
||||
format!(
|
||||
"invalid {ENV_RUSTFS_INTERNODE_DATA_TRANSPORT}={transport:?}; supported values: {DEFAULT_INTERNODE_DATA_TRANSPORT}, {INTERNODE_DATA_TRANSPORT_TCP}"
|
||||
"invalid {ENV_RUSTFS_INTERNODE_DATA_TRANSPORT}={transport:?}; supported values: {}",
|
||||
KNOWN_INTERNODE_DATA_TRANSPORT_BACKENDS.join(", ")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user