Skip to content

Commit

Permalink
fix: add metasrv config to sqlness with kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Dec 28, 2023
1 parent f408b70 commit 907211a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/meta/src/wal/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub use crate::wal::kafka::topic_manager::TopicManager;

/// Configurations for kafka wal.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct KafkaConfig {
/// The broker endpoints of the Kafka cluster.
pub broker_endpoints: Vec<String>,
Expand Down
10 changes: 10 additions & 0 deletions tests/conf/metasrv-test.toml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[wal]
{{ if is_raft_engine }}
provider = "raft_engine"
{{ else }}
provider = "kafka"
broker_endpoints = {kafka_wal_broker_endpoints | unescaped}
num_topics = 64
selector_type = "round_robin"
topic_name_prefix = "distributed_test_greptimedb_wal_topic"
{{ endif }}
2 changes: 2 additions & 0 deletions tests/runner/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ impl Env {
"--enable-region-failover".to_string(),
"false".to_string(),
"--http-addr=127.0.0.1:5002".to_string(),
"-c".to_string(),
self.generate_config_file(subcommand, db_ctx),
];
(args, METASRV_ADDR.to_string())
}
Expand Down

0 comments on commit 907211a

Please sign in to comment.