Unverified Commit 32647f72 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

fix: align task aborts with current canary

Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
parent ff27dae0
......@@ -10,7 +10,7 @@ use tokio::sync::Notify;
use turbo_rcstr::RcStr;
use turbo_tasks::{
CollectiblesSource, NonLocalValue, ReadRef, ResolvedVc, State, TransientInstance,
ValueToString, Vc, VcValueTrait, backend::Backend, emit, trace::TraceRawVcs,
ValueToString, Vc, VcValueTrait, backend::Backend, emit,
};
use turbo_tasks_testing::{Registration, register, run_once};
......@@ -34,21 +34,17 @@ impl ValueToString for TestCollectible {
}
}
#[derive(TraceRawVcs, NonLocalValue)]
#[derive(NonLocalValue)]
struct ExecutionControl {
#[turbo_tasks(trace_ignore)]
block_from_generation: usize,
#[turbo_tasks(trace_ignore)]
started: AtomicUsize,
#[turbo_tasks(trace_ignore)]
emitted: AtomicUsize,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
progress_notify: Notify,
#[turbo_tasks(trace_ignore)]
dropped: AtomicUsize,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
dropped_notify: Notify,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
release: Notify,
}
......
......@@ -14,7 +14,7 @@ use std::{
use anyhow::Result;
use tokio::sync::Notify;
use turbo_tasks::{
ReadRef, ResolvedVc, State, TransientInstance, TurboTasksApi, Vc, trace::TraceRawVcs,
NonLocalValue, ReadRef, ResolvedVc, State, TransientInstance, TurboTasksApi, Vc,
};
use crate::util::create_tt;
......@@ -24,17 +24,15 @@ struct ChangingInput {
state: State<u32>,
}
#[derive(TraceRawVcs)]
#[derive(NonLocalValue)]
struct ExecutionControl {
#[turbo_tasks(trace_ignore)]
started: AtomicUsize,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
started_notify: Notify,
#[turbo_tasks(trace_ignore)]
dropped: AtomicUsize,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
dropped_notify: Notify,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
releases: [Notify; 2],
}
......@@ -62,13 +60,12 @@ impl ExecutionControl {
}
}
#[derive(TraceRawVcs)]
#[derive(NonLocalValue)]
struct CompletionRaceControl {
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
started: Notify,
#[turbo_tasks(trace_ignore)]
generation: AtomicUsize,
#[turbo_tasks(trace_ignore)]
#[turbo_tasks(unsafe_ignore)]
first_poll_release: Barrier,
}
......
......@@ -379,6 +379,14 @@ fn make_stats_deterministic(mut json: serde_json::Value) -> serde_json::Value {
object.remove("abort_raced_completion_inactive");
object.remove("abort_skipped_invalidation");
object.remove("abort_skipped_inactive");
// Strongly reading the test operation executes its outer wrapper. Abort telemetry
// creates an entry for that execution, but after removing racy execution fields it
// has no cache activity and is irrelevant to these cache-statistics snapshots.
if object.get("cache_hit").and_then(serde_json::Value::as_u64) == Some(0)
&& object.get("cache_miss").and_then(serde_json::Value::as_u64) == Some(0)
{
continue;
}
map.insert(k, v);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment