Compare commits

..

1 Commits

Author SHA1 Message Date
Jose Fernandez (magec)
c098c54670 Fix default_role being ignored when query_parser_enabled was false 2024-11-06 11:05:58 +01:00
6 changed files with 2 additions and 9 deletions

View File

@@ -5,4 +5,4 @@ maintainers:
- name: Wildcard - name: Wildcard
email: support@w6d.io email: support@w6d.io
appVersion: "1.2.0" appVersion: "1.2.0"
version: 0.2.4 version: 0.2.1

View File

@@ -1,2 +1 @@
sign: false sign: false
pages_branch: main

View File

@@ -179,8 +179,7 @@ primary_reads_enabled = true
# `random`: picks a shard at random # `random`: picks a shard at random
# `random_healthy`: picks a shard at random favoring shards with the least number of recent errors # `random_healthy`: picks a shard at random favoring shards with the least number of recent errors
# `shard_<number>`: e.g. shard_0, shard_4, etc. picks a specific shard, everytime # `shard_<number>`: e.g. shard_0, shard_4, etc. picks a specific shard, everytime
# `fail`: fails to pick up shard. (require explicit shard setup) # no_shard_specified_behavior = "shard_0"
# default_shard = "shard_0"
# So what if you wanted to implement a different hashing function, # So what if you wanted to implement a different hashing function,
# or you've already built one and you want this pooler to use it? # or you've already built one and you want this pooler to use it?

View File

@@ -773,7 +773,6 @@ pub enum DefaultShard {
Shard(usize), Shard(usize),
Random, Random,
RandomHealthy, RandomHealthy,
Fail,
} }
impl Default for DefaultShard { impl Default for DefaultShard {
fn default() -> Self { fn default() -> Self {
@@ -788,7 +787,6 @@ impl serde::Serialize for DefaultShard {
} }
DefaultShard::Random => serializer.serialize_str("random"), DefaultShard::Random => serializer.serialize_str("random"),
DefaultShard::RandomHealthy => serializer.serialize_str("random_healthy"), DefaultShard::RandomHealthy => serializer.serialize_str("random_healthy"),
DefaultShard::Fail => serializer.serialize_str("fail"),
} }
} }
} }
@@ -806,7 +804,6 @@ impl<'de> serde::Deserialize<'de> for DefaultShard {
match s.as_str() { match s.as_str() {
"random" => Ok(DefaultShard::Random), "random" => Ok(DefaultShard::Random),
"random_healthy" => Ok(DefaultShard::RandomHealthy), "random_healthy" => Ok(DefaultShard::RandomHealthy),
"fail" => Ok(DefaultShard::Fail),
_ => Err(serde::de::Error::custom( _ => Err(serde::de::Error::custom(
"invalid value for no_shard_specified_behavior", "invalid value for no_shard_specified_behavior",
)), )),

View File

@@ -30,7 +30,6 @@ pub enum Error {
QueryRouterError(String), QueryRouterError(String),
InvalidShardId(usize), InvalidShardId(usize),
PreparedStatementError, PreparedStatementError,
NoShardSelected,
} }
#[derive(Clone, PartialEq, Debug)] #[derive(Clone, PartialEq, Debug)]

View File

@@ -720,7 +720,6 @@ impl ConnectionPool {
.unwrap() .unwrap()
}); });
} }
DefaultShard::Fail => return Err(Error::NoShardSelected),
}, },
}; };