Minor refactor for configs (#172)

* Changes shard struct to use vector of ServerConfig

* Adds to query router

* Change client disconnect with error message to warn instead of debug

* Add warning logs for clean up actions
This commit is contained in:
zainkabani
2022-09-22 13:07:02 -04:00
committed by GitHub
parent 85cc2f4147
commit 3a729bb75b
5 changed files with 32 additions and 39 deletions

View File

@@ -169,8 +169,8 @@ impl QueryRouter {
Command::ShowShard => self.shard().to_string(),
Command::ShowServerRole => match self.active_role {
Some(Role::Primary) => String::from("primary"),
Some(Role::Replica) => String::from("replica"),
Some(Role::Primary) => Role::Primary.to_string(),
Some(Role::Replica) => Role::Replica.to_string(),
None => {
if self.query_parser_enabled {
String::from("auto")