Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
609a59e
### Add Process List Management
v0y4g3r Jan 12, 2025
35d65a5
refactor: Update test IP addresses to include ports in ProcessKey
v0y4g3r Jan 13, 2025
0d90277
feat/show-process-list:
v0y4g3r Jan 15, 2025
8b570bf
chore: rebase main
v0y4g3r Apr 9, 2025
3ab8e21
add information schema process list table
v0y4g3r Apr 9, 2025
4c65aa8
integrate process list table to system catalog
v0y4g3r Apr 9, 2025
9b38bdb
build ProcessManager on frontend and standalone mode
v0y4g3r Apr 9, 2025
e1f46a3
feat/show-process-list:
v0y4g3r Apr 9, 2025
d20ed95
feat/show-process-list:
v0y4g3r Apr 9, 2025
5c5211b
feat/show-process-list:
v0y4g3r Apr 9, 2025
9f957b4
feat/show-process-list:
v0y4g3r Apr 10, 2025
2c62545
wip: move ProcessManager to catalog crate
v0y4g3r Apr 11, 2025
66535fc
feat/show-process-list:
v0y4g3r Apr 11, 2025
a38c12c
feat/show-process-list:
v0y4g3r Apr 13, 2025
caadc7b
chore: remove register
v0y4g3r Apr 14, 2025
5c70e10
fix: sqlness tests
v0y4g3r Apr 14, 2025
7ea6006
Merge remote-tracking branch 'GreptimeTeam/main' into feat/show-proce…
v0y4g3r Jun 9, 2025
0b3fd38
merge main
v0y4g3r Jun 9, 2025
75a15aa
feat/show-process-list:
v0y4g3r Jun 10, 2025
2ae4c6d
feat/show-process-list:
v0y4g3r Jun 10, 2025
f06ce59
feat/show-process-list:
v0y4g3r Jun 11, 2025
eb3fd43
feat/show-process-list:
v0y4g3r Jun 11, 2025
5f986ba
feat/show-process-list:
v0y4g3r Jun 11, 2025
b375458
feat/show-process-list:
v0y4g3r Jun 11, 2025
78cb9c7
feat/show-process-list:
v0y4g3r Jun 11, 2025
01fdcc2
feat/show-process-list:
v0y4g3r Jun 11, 2025
d3ed78c
feat/show-process-list:
v0y4g3r Jun 11, 2025
19f50c2
feat/show-process-list:
v0y4g3r Jun 11, 2025
1e9a9b2
feat/show-process-list:
v0y4g3r Jun 12, 2025
e516ae4
feat/show-process-list:
v0y4g3r Jun 12, 2025
5e56349
feat/show-process-list:
v0y4g3r Jun 12, 2025
d01e151
feat/show-process-list:
v0y4g3r Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions src/catalog/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,27 @@ pub enum Error {
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Failed to bump sequence for process manager"))]
BumpSequence {
source: common_meta::error::Error,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Failed to start process report task"))]
StartReportTask {
source: common_runtime::error::Error,
#[snafu(implicit)]
location: Location,
},

#[snafu(display("Failed to report process state"))]
ReportProcess {
source: common_meta::error::Error,
#[snafu(implicit)]
location: Location,
},
}

impl Error {
Expand Down Expand Up @@ -342,9 +363,11 @@ impl ErrorExt for Error {
Error::Datafusion { error, .. } => datafusion_status_code::<Self>(error, None),
Error::ProjectViewColumns { .. } => StatusCode::EngineExecuteQuery,
Error::TableMetadataManager { source, .. } => source.status_code(),
Error::GetViewCache { source, .. } | Error::GetTableCache { source, .. } => {
source.status_code()
}
Error::GetViewCache { source, .. }
| Error::GetTableCache { source, .. }
| Error::BumpSequence { source, .. }
| Error::ReportProcess { source, .. } => source.status_code(),
Error::StartReportTask { .. } => StatusCode::Internal,
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/catalog/src/kvbackend/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use crate::error::{
};
use crate::information_schema::{InformationExtensionRef, InformationSchemaProvider};
use crate::kvbackend::TableCacheRef;
use crate::process_manager::ProcessManager;
use crate::system_schema::pg_catalog::PGCatalogProvider;
use crate::system_schema::SystemSchemaProvider;
use crate::CatalogManager;
Expand Down Expand Up @@ -84,6 +85,7 @@ impl KvBackendCatalogManager {
backend: KvBackendRef,
cache_registry: LayeredCacheRegistryRef,
procedure_manager: Option<ProcedureManagerRef>,
process_manager: Option<Arc<ProcessManager>>,
) -> Arc<Self> {
Arc::new_cyclic(|me| Self {
information_extension,
Expand All @@ -102,12 +104,14 @@ impl KvBackendCatalogManager {
DEFAULT_CATALOG_NAME.to_string(),
me.clone(),
Arc::new(FlowMetadataManager::new(backend.clone())),
process_manager.clone(),
)),
pg_catalog_provider: Arc::new(PGCatalogProvider::new(
DEFAULT_CATALOG_NAME.to_string(),
me.clone(),
)),
backend,
process_manager,
},
cache_registry,
procedure_manager,
Expand Down Expand Up @@ -419,6 +423,7 @@ struct SystemCatalog {
information_schema_provider: Arc<InformationSchemaProvider>,
pg_catalog_provider: Arc<PGCatalogProvider>,
backend: KvBackendRef,
process_manager: Option<Arc<ProcessManager>>,
}

impl SystemCatalog {
Expand Down Expand Up @@ -486,6 +491,7 @@ impl SystemCatalog {
catalog.to_string(),
self.catalog_manager.clone(),
Arc::new(FlowMetadataManager::new(self.backend.clone())),
self.process_manager.clone(),
))
});
information_schema_provider.table(table_name)
Expand Down
1 change: 1 addition & 0 deletions src/catalog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub mod information_schema {
pub use crate::system_schema::information_schema::*;
}

pub mod process_manager;
pub mod table_source;

#[async_trait::async_trait]
Expand Down
1 change: 1 addition & 0 deletions src/catalog/src/memory/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ impl MemoryCatalogManager {
catalog,
Arc::downgrade(self) as Weak<dyn CatalogManager>,
Arc::new(FlowMetadataManager::new(Arc::new(MemoryKvBackend::new()))),
None, // we don't need ProcessManager on regions server.
);
let information_schema = information_schema_provider.tables().clone();

Expand Down
Loading