Skip to content

Commit 0c4ddab

Browse files
fix: query execution at the time of hottier eviction (#1797)
* fix: query execution at the time of hottier eviction query takes a guard if time range matches hottier eviction flow skips the hottier sync cycle so query can be served from hottier add check to skip stream related tasks for suspended tenants like - - hottier sync - retention task * serve query from object store if query_guard fails * reuse in enterprise * reconciliation and failed-download cleanup to respect query pins * coderabbit comments and deepsource fix * fix issue with unguarded queries
1 parent b09ab6f commit 0c4ddab

7 files changed

Lines changed: 623 additions & 42 deletions

File tree

‎src/alerts/alerts_utils.rs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ use crate::{
4040
option::Mode,
4141
parseable::PARSEABLE,
4242
query::{QUERY_SESSION, execute, resolve_stream_names},
43+
tenants::TENANT_METADATA,
4344
utils::time::TimeRange,
4445
};
4546

@@ -57,6 +58,14 @@ use super::{ALERTS, AlertError, AlertOperator, AlertState};
5758
///
5859
/// check whether notification needs to be triggered or not
5960
pub async fn evaluate_alert(alert: &dyn AlertTrait) -> Result<(), AlertError> {
61+
if alert
62+
.get_tenant_id()
63+
.as_deref()
64+
.is_some_and(|tenant| TENANT_METADATA.is_workspace_suspended(tenant))
65+
{
66+
return Ok(());
67+
}
68+
6069
trace!("RUNNING EVAL TASK FOR- {alert:?}");
6170

6271
let message = alert.eval_alert().await?;

0 commit comments

Comments
 (0)