-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ENH][chroma-load] Support delay on workloads. #3210
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
rust/load/examples/workload-json.rs
Outdated
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.
Is the idea that we define the workloads as Rust programs entirely? I guess I'm a little confused on when they are "named" versus being defined here inside a main
? Also, should these just be in a test case somewhere?
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.
There are "datasets", "workloads" and composed "running workloads". A dataset + workload becomes a running workload. Names refer to workloads in workloads.rs as pre-defined patterns that can be referred to from another workload. Thus, "by name" can refer to a rust-defined workload, but any json workload can be specified and it will just work.
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.
Got it, thanks for the clarification.
Workload::Get(_) => true, | ||
Workload::Query(_) => true, | ||
Workload::Hybrid(hybrid) => hybrid.iter().any(|(_, w)| w.is_active()), | ||
Workload::Delay { after, wrap } => chrono::Utc::now() >= *after && wrap.is_active(), |
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.
From my understanding the delay workload will be run after a specific timestamp. This seems to imply that the same workflow config can only be used once (or some other script have to generate the config with a timestamp each time it run). May I ask why this is designed like this?
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.
It was largely an artifact of not thinking about my types. Will update.
This supports delaying a workload. The way it's implemented, workloads advertise being "active" and just silently NOP when they are "inactive".
chroma-load-start start a workload chroma-load-stop stop a workload chroma-load-inhibit stop all workloads chroma-load-uninhibit reverse the effects of chroma-load-inhibit
This supports delaying a workload. The way it's implemented, workloads
advertise being "active" and just silently NOP when they are "inactive".