mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-26 18:00:41 +00:00
feat: introduce read preference (#5783)
* feat: introduce read preference * feat: introduce `RegionQueryHandlerFactory` * feat: extract ReadPreference from http header * test: add more tests * chore: apply suggestions from CR * chore: apply suggestions from CR
This commit is contained in:
@@ -20,6 +20,7 @@ datatypes.workspace = true
|
||||
itertools.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
session.workspace = true
|
||||
snafu.workspace = true
|
||||
sql.workspace = true
|
||||
sqlparser.workspace = true
|
||||
|
||||
@@ -171,6 +171,7 @@ impl PartitionRuleManager {
|
||||
Ok(Arc::new(rule) as _)
|
||||
}
|
||||
|
||||
/// Find the leader of the region.
|
||||
pub async fn find_region_leader(&self, region_id: RegionId) -> Result<Peer> {
|
||||
let region_routes = &self
|
||||
.find_physical_table_route(region_id.table_id())
|
||||
|
||||
Reference in New Issue
Block a user