mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-22 07:50:38 +00:00
feat(log_store): introduce the CollectionTask (#4530)
* feat: introduce the `CollectionTask` * feat: add config of index collector * chore: remove unused code * feat: truncate indexes * chore: apply suggestions from CR * chore: update config examples * refactor: retrieve latest offset while dumping indexes * chore: print warn
This commit is contained in:
@@ -30,6 +30,7 @@ pub enum MetasrvWalConfig {
|
||||
Kafka(MetasrvKafkaConfig),
|
||||
}
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
/// Wal configurations for datanode.
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||
#[serde(tag = "provider", rename_all = "snake_case")]
|
||||
@@ -223,6 +224,7 @@ mod tests {
|
||||
replication_factor: 1,
|
||||
create_topic_timeout: Duration::from_secs(30),
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
assert_eq!(datanode_wal_config, DatanodeWalConfig::Kafka(expected));
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ pub struct DatanodeKafkaConfig {
|
||||
/// The kafka topic config.
|
||||
#[serde(flatten)]
|
||||
pub kafka_topic: KafkaTopicConfig,
|
||||
pub create_index: bool,
|
||||
#[serde(with = "humantime_serde")]
|
||||
pub dump_index_interval: Duration,
|
||||
}
|
||||
|
||||
impl Default for DatanodeKafkaConfig {
|
||||
@@ -51,6 +54,8 @@ impl Default for DatanodeKafkaConfig {
|
||||
consumer_wait_timeout: Duration::from_millis(100),
|
||||
backoff: BackoffConfig::default(),
|
||||
kafka_topic: KafkaTopicConfig::default(),
|
||||
create_index: true,
|
||||
dump_index_interval: Duration::from_secs(60),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user