Skip to content

Commit

Permalink
Fixed read replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Aug 14, 2024
1 parent e2eb851 commit 79297c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions crates/common/src/manager/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ impl Patterns {
Pattern::Include(MatchType::Equal("storage.fts".to_string())),
Pattern::Include(MatchType::Equal("storage.directory".to_string())),
Pattern::Include(MatchType::Equal("lookup.default.hostname".to_string())),
Pattern::Include(MatchType::Equal("enterprise.license-key".to_string())),
];
}

Expand Down
2 changes: 1 addition & 1 deletion crates/store/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl Stores {
}
}
#[cfg(feature = "enterprise")]
"composite-read" | "composite-blob" => {
"sql-read-replica" | "composite-blob" => {
composite_stores.push((store_id, protocol));
}
unknown => {
Expand Down
9 changes: 7 additions & 2 deletions tests/src/imap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ use utils::config::Config;
use crate::{add_test_certs, directory::DirectoryStore, store::TempDir, AssertConfig};

const SERVER: &str = r#"
[server]
hostname = "'imap.example.org'"
[lookup.default]
hostname = "imap.example.org"
[server.listener.imap]
bind = ["127.0.0.1:9991"]
Expand Down Expand Up @@ -152,6 +152,11 @@ database = "stalwart"
user = "postgres"
password = "mysecretpassword"
[store."psql-replica"]
type = "sql-read-replica"
primary = "postgresql"
replicas = "postgresql"
[store."mysql"]
type = "mysql"
host = "localhost"
Expand Down

0 comments on commit 79297c3

Please sign in to comment.