-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes based on Griddy Chain #206
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self review done, lgtm
.env.example
Outdated
@@ -81,6 +82,9 @@ MADARA_ORCHESTRATOR_HOST= # Server host | |||
MADARA_ORCHESTRATOR_PORT= # Server port | |||
|
|||
#### SERVICE #### | |||
|
|||
MADARA_ORCHESTRATOR_UNIQUE_ID= # Unique ID for the orchestrator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this used?
|
||
/// The maximum number of SNOS jobs to process concurrently. | ||
#[arg(env = "MADARA_ORCHESTRATOR_MAX_CONCURRENT_SNOS_JOBS", long)] | ||
pub max_concurrent_snos_jobs: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not do an optional u64 direcrtly?
@@ -419,4 +419,34 @@ impl Database for MongoDb { | |||
ORCHESTRATOR_METRICS.db_calls_response_time.record(duration.as_secs_f64(), &attributes); | |||
Ok(jobs) | |||
} | |||
|
|||
#[tracing::instrument(skip(self, limit), fields(function_type = "db_call"), ret, err)] | |||
async fn get_jobs_by_statuses_and_orchestrator_id( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the purpose is to differentiate between pods, I don't think it's a good design as discussed before.
crates/orchestrator/src/jobs/mod.rs
Outdated
return Ok(true); | ||
} | ||
|
||
let jobs = config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't need to be stored in the db, we can use a semaphore for this. it's simpler imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these changes needed anymore
* update: added delay between cron rule & creation * update: added min_block_to_process for state_update worker * added: changelog
SNOS concurrency control and resource optimization
Core Changes
1. Orchestrator Concurrency Control
MADARA_ORCHESTRATOR_MAX_CONCURRENT_SNOS_JOBS
: Controls parallel SNOS jobs per runnerMADARA_ORCHESTRATOR_UNIQUE_ID
: Unique identifier for each runner pod2. Job Processing Tracking
3. Consistency Improvements
4. Memory Optimization