mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-27 10:20:38 +00:00
chore: run fuzz tests with kafka remote wal (#4105)
* chore: add fuzz tests with kafka * chore(ci): use minio * chore: add empty line * chore(ci): refactor * chore: add empty line * fix: update config * fix: add default value for `MetaClientOptions` * fix: remove redundant `debug_assert` * chore: run fuzz tests with disk cache * chore: remove redundant minio setup * chore: cache targets * Revert "chore: run fuzz tests with disk cache" This reverts commitd81783187d. * chore: fix typo * chore: apply suggestions from CR * Revert "fix: remove redundant `debug_assert`" This reverts commit09b899eed1.
This commit is contained in:
@@ -21,71 +21,37 @@ pub mod error;
|
||||
|
||||
// Options for meta client in datanode instance.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(default)]
|
||||
pub struct MetaClientOptions {
|
||||
pub metasrv_addrs: Vec<String>,
|
||||
#[serde(default = "default_timeout")]
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub timeout: Duration,
|
||||
#[serde(default = "default_heartbeat_timeout")]
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub heartbeat_timeout: Duration,
|
||||
#[serde(default = "default_ddl_timeout")]
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub ddl_timeout: Duration,
|
||||
#[serde(default = "default_connect_timeout")]
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub connect_timeout: Duration,
|
||||
pub tcp_nodelay: bool,
|
||||
#[serde(default = "default_metadata_cache_max_capacity")]
|
||||
pub metadata_cache_max_capacity: u64,
|
||||
#[serde(default = "default_metadata_cache_ttl")]
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub metadata_cache_ttl: Duration,
|
||||
#[serde(default = "default_metadata_cache_tti")]
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub metadata_cache_tti: Duration,
|
||||
}
|
||||
|
||||
fn default_heartbeat_timeout() -> Duration {
|
||||
Duration::from_millis(500u64)
|
||||
}
|
||||
|
||||
fn default_ddl_timeout() -> Duration {
|
||||
Duration::from_millis(10_000u64)
|
||||
}
|
||||
|
||||
fn default_connect_timeout() -> Duration {
|
||||
Duration::from_millis(1_000u64)
|
||||
}
|
||||
|
||||
fn default_timeout() -> Duration {
|
||||
Duration::from_millis(3_000u64)
|
||||
}
|
||||
|
||||
fn default_metadata_cache_max_capacity() -> u64 {
|
||||
100_000u64
|
||||
}
|
||||
|
||||
fn default_metadata_cache_ttl() -> Duration {
|
||||
Duration::from_secs(600u64)
|
||||
}
|
||||
|
||||
fn default_metadata_cache_tti() -> Duration {
|
||||
Duration::from_secs(300u64)
|
||||
}
|
||||
|
||||
impl Default for MetaClientOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
metasrv_addrs: vec!["127.0.0.1:3002".to_string()],
|
||||
timeout: default_timeout(),
|
||||
heartbeat_timeout: default_heartbeat_timeout(),
|
||||
ddl_timeout: default_ddl_timeout(),
|
||||
connect_timeout: default_connect_timeout(),
|
||||
timeout: Duration::from_millis(3_000u64),
|
||||
heartbeat_timeout: Duration::from_millis(500u64),
|
||||
ddl_timeout: Duration::from_millis(10_000u64),
|
||||
connect_timeout: Duration::from_millis(1_000u64),
|
||||
tcp_nodelay: true,
|
||||
metadata_cache_max_capacity: default_metadata_cache_max_capacity(),
|
||||
metadata_cache_ttl: default_metadata_cache_ttl(),
|
||||
metadata_cache_tti: default_metadata_cache_tti(),
|
||||
metadata_cache_max_capacity: 100_000u64,
|
||||
metadata_cache_ttl: Duration::from_secs(600u64),
|
||||
metadata_cache_tti: Duration::from_secs(300u64),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user