feat: support multi regions on datanode (#653)

* wip: fix compile errors

* chore: move splitter to partition crate

* fix: remove useless variants in frontend errors

* chore: move more partition related code to partition manager

* fix: license header

* wip: move WriteSplitter to PartitionRuleManager

* fix: clippy warnings

* chore: remove useless error variant and format toml

* fix: cr comments

* chore: resolve conflicts

* chore: rebase develop

* fix: cr comments

* feat: support multi regions on datanode

* chore: rebase onto develop

* chore: rebase develop

* chore: rebase develop

* wip

* fix: compile errors

* feat: multi region

* fix: CR comments

* feat: allow stat existing regions without actually open it

* fix: use table meta in manifest to recover region info
This commit is contained in:
Lei, HUANG
2023-02-07 10:46:18 +08:00
committed by GitHub
parent 7d77913e88
commit 5d62e193bd
26 changed files with 383 additions and 227 deletions

View File

@@ -18,6 +18,7 @@ use std::sync::Arc;
use catalog::{CatalogManagerRef, RegisterSystemTableRequest};
use common_catalog::consts::{DEFAULT_CATALOG_NAME, DEFAULT_SCHEMA_NAME, SCRIPTS_TABLE_ID};
use common_catalog::format_full_table_name;
use common_query::Output;
use common_recordbatch::util as record_util;
use common_telemetry::logging;
@@ -77,7 +78,7 @@ impl ScriptsTable {
Ok(Self {
catalog_manager,
query_engine,
name: catalog::format_full_table_name(
name: format_full_table_name(
DEFAULT_CATALOG_NAME,
DEFAULT_SCHEMA_NAME,
SCRIPTS_TABLE_NAME,
@@ -131,6 +132,7 @@ impl ScriptsTable {
schema_name: DEFAULT_SCHEMA_NAME.to_string(),
table_name: SCRIPTS_TABLE_NAME.to_string(),
columns_values,
region_number: 0,
})
.await
.context(InsertScriptSnafu { name })?;