Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions components/spider-storage/src/state/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ use crate::task_instance_pool::create_task_instance_pool;
/// Runtime configuration for the storage service.
#[derive(Clone, Debug, Deserialize)]
pub struct RuntimeConfig {
pub db_config: DatabaseConfig,
pub db: DatabaseConfig,
#[serde(default)]
pub ready_queue_config: ReadyQueueConfig,
pub ready_queue: ReadyQueueConfig,
#[serde(default)]
pub task_instance_pool_config: TaskInstancePoolConfig,
pub task_instance_pool: TaskInstancePoolConfig,
#[serde(default)]
pub job_cache_gc_config: JobCacheGcConfig,
pub job_cache_gc: JobCacheGcConfig,
}

/// Runtime state for the storage service.
Expand Down Expand Up @@ -153,15 +153,15 @@ pub async fn create_runtime(
StorageServerError,
> {
let cancellation_token = CancellationToken::new();
let db = MariaDbStorageConnector::connect(&config.db_config).await?;
let db = MariaDbStorageConnector::connect(&config.db).await?;
let session_id = db.session_id();
let (ready_queue_sender, ready_queue_receiver) =
create_ready_queue(&config.ready_queue_config).map_err(CacheError::from)?;
create_ready_queue(&config.ready_queue).map_err(CacheError::from)?;
let (task_instance_pool_connector, task_instance_pool_join_handle) = create_task_instance_pool(
ready_queue_sender.clone(),
db.clone(),
cancellation_token.clone(),
&config.task_instance_pool_config,
&config.task_instance_pool,
)
.map_err(CacheError::from)?;

Expand All @@ -174,7 +174,7 @@ pub async fn create_runtime(
let (job_cache_gc_handle, job_cache_gc_join_handle) = create_job_cache_gc(
job_cache.clone(),
cancellation_token.clone(),
&config.job_cache_gc_config,
&config.job_cache_gc,
)
.map_err(CacheError::from)?;
let service_state = ServiceState::new(ServiceStateParams {
Expand Down
8 changes: 4 additions & 4 deletions components/spider-storage/tests/runtime_recovery_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ async fn restarted_storage_cache_recovers_cleanup_ready_job() -> anyhow::Result<
/// while other configurations set to default.
fn create_runtime_config() -> RuntimeConfig {
RuntimeConfig {
db_config: create_mariadb_config(),
ready_queue_config: ReadyQueueConfig::default(),
task_instance_pool_config: TaskInstancePoolConfig::default(),
job_cache_gc_config: JobCacheGcConfig::default(),
db: create_mariadb_config(),
ready_queue: ReadyQueueConfig::default(),
task_instance_pool: TaskInstancePoolConfig::default(),
job_cache_gc: JobCacheGcConfig::default(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/deployment/spider-helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: "v2"
name: "spider"
description: "A Helm chart for the Spider Huntsman deployment"
type: "application"
version: "0.1.9"
version: "0.1.10"
appVersion: "0.1.0-dev"
home: "https://github.com/y-scope/spider"
sources: ["https://github.com/y-scope/spider"]
Expand Down
2 changes: 1 addition & 1 deletion tools/deployment/spider-helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data:
host: "0.0.0.0"
port: {{ .Values.spiderConfig.storage.port }}
runtime:
db_config:
db:
host: {{ include "spider.databaseHost" . | quote }}
max_connections: {{ .Values.spiderConfig.database.max_connections }}
name: {{ .Values.spiderConfig.database.name | quote }}
Expand Down
2 changes: 1 addition & 1 deletion tools/deployment/spider-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spiderConfig:
log_level: "INFO"
port: 50051
runtime:
ready_queue_config:
ready_queue:
cleanup_capacity: 256
commit_capacity: 256
task_capacity: 1048576
Expand Down
Loading