Skip to main content

shadow_execute

Function shadow_execute 

Source
pub async fn shadow_execute(
    primary: &mut BackendClient,
    shadow_cfg: &BackendConfig,
    sql: &str,
    params: &[ParamValue],
) -> Result<(QueryResult, ShadowExecuteReport)>
Expand description

Run sql on primary and shadow concurrently. Returns the primary’s result for the application to consume, plus a shadow report containing the comparison.

params are interpolated into the SQL using the same text-format substitution the failover-replay engine uses (no extended protocol).