mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-27 18:56:30 +00:00
Dont change shard unless you know (#195)
This commit is contained in:
@@ -335,8 +335,14 @@ impl QueryRouter {
|
|||||||
// or discard shard selection. If they point to the same shard though,
|
// or discard shard selection. If they point to the same shard though,
|
||||||
// we can let them through as-is.
|
// we can let them through as-is.
|
||||||
// This is basically building a database now :)
|
// This is basically building a database now :)
|
||||||
self.active_shard = self.infer_shard(query);
|
match self.infer_shard(query) {
|
||||||
debug!("Automatically using shard: {:?}", self.active_shard);
|
Some(shard) => {
|
||||||
|
self.active_shard = Some(shard);
|
||||||
|
debug!("Automatically using shard: {:?}", self.active_shard);
|
||||||
|
}
|
||||||
|
|
||||||
|
None => (),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
None => (),
|
None => (),
|
||||||
|
|||||||
Reference in New Issue
Block a user