@@ -374,17 +374,10 @@ fn validate(node_config: &NodeConfig) -> anyhow::Result<()> {
374374
375375/// Validates the configuration of the [`QuickwitService::MetastoreReadReplica`] role.
376376///
377- /// When configured, `metastore_read_replica_uri` must be a PostgreSQL URI. The
378- /// [`QuickwitService::MetastoreReadReplica`] role serves the same gRPC service as
377+ /// The [`QuickwitService::MetastoreReadReplica`] role serves the same gRPC service as
379378/// [`QuickwitService::Metastore`], so the two cannot run on the same node, and the read-replica
380379/// role requires `metastore_read_replica_uri` to connect to.
381380fn validate_metastore_read_replica ( node_config : & NodeConfig ) -> anyhow:: Result < ( ) > {
382- if let Some ( uri) = & node_config. metastore_read_replica_uri
383- && !uri. protocol ( ) . is_database ( )
384- {
385- bail ! ( "`metastore_read_replica_uri` must point to a PostgreSQL database, got `{uri}`" ) ;
386- }
387-
388381 let read_replica_enabled =
389382 node_config. is_service_enabled ( QuickwitService :: MetastoreReadReplica ) ;
390383 if !read_replica_enabled {
@@ -1062,7 +1055,7 @@ mod tests {
10621055 }
10631056
10641057 #[ tokio:: test]
1065- async fn test_metastore_read_replica_role_requires_postgres_uri ( ) {
1058+ async fn test_metastore_read_replica_role_accepts_postgres_uri ( ) {
10661059 let config_yaml = r#"
10671060 version: 0.8
10681061 node_id: test-node
@@ -1128,42 +1121,6 @@ mod tests {
11281121 ) ;
11291122 }
11301123
1131- #[ tokio:: test]
1132- async fn test_metastore_read_replica_uri_must_be_a_database ( ) {
1133- let config_yaml = r#"
1134- version: 0.8
1135- node_id: test-node
1136- enabled_services:
1137- - metastore_read_replica
1138- metastore_read_replica_uri: s3://not-a-database
1139- "# ;
1140- let error = load_node_config_with_env (
1141- ConfigFormat :: Yaml ,
1142- config_yaml. as_bytes ( ) ,
1143- & Default :: default ( ) ,
1144- )
1145- . await
1146- . unwrap_err ( ) ;
1147- assert ! ( error. to_string( ) . contains( "must point to a PostgreSQL" ) ) ;
1148- }
1149-
1150- #[ tokio:: test]
1151- async fn test_metastore_read_replica_uri_must_be_a_database_even_without_role ( ) {
1152- let config_yaml = r#"
1153- version: 0.8
1154- node_id: test-node
1155- metastore_read_replica_uri: s3://not-a-database
1156- "# ;
1157- let error = load_node_config_with_env (
1158- ConfigFormat :: Yaml ,
1159- config_yaml. as_bytes ( ) ,
1160- & Default :: default ( ) ,
1161- )
1162- . await
1163- . unwrap_err ( ) ;
1164- assert ! ( error. to_string( ) . contains( "must point to a PostgreSQL" ) ) ;
1165- }
1166-
11671124 #[ tokio:: test]
11681125 async fn test_metastore_and_read_replica_roles_are_mutually_exclusive ( ) {
11691126 let config_yaml = r#"
0 commit comments