Skip to content

Commit

Permalink
fix task id reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Aug 8, 2024
1 parent 319dca6 commit 95c0326
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions turbopack/crates/turbo-tasks-memory/src/memory_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use turbo_tasks::{
},
event::EventListener,
util::{IdFactoryWithReuse, NoMoveVec},
CellId, RawVc, TaskId, TaskIdSet, TraitTypeId, TurboTasksBackendApi, Unused, ValueTypeId,
TRANSIENT_TASK_BIT,
CellId, RawVc, TaskId, TaskIdSet, TaskInput, TraitTypeId, TurboTasksBackendApi, Unused,

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / rustdoc check / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / rust check / build

unused import: `TaskInput`

Check failure on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / rust check / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / build-native / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-unknown-linux-gnu - node@16

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / stable - aarch64-apple-darwin - node@16

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / build / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / stable - aarch64-unknown-linux-gnu - node@16

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test cargo benches / Test

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test unit (20) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Run devlow benchmarks (--turbopack=true, --scenario=heavy-npm-deps --page=homepage) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / types and precompiled / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test unit (18) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test cargo unit / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test next-swc wasm / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack development integration (4/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test firefox and safari / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-apple-darwin - node@16

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Run devlow benchmarks (--turbopack=false, --scenario=heavy-npm-deps --page=homepage) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (prod) (2/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (dev) (2/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (prod) (1/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (dev) (4/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (dev) (1/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (prod) (4/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (dev) (3/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests for flakes (prod) (3/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / stable - x86_64-pc-windows-msvc - node@16

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr integration / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr dev (1/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production (5/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack development integration (2/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test dev (1/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / lint / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (6/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test dev (3/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (3/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (1/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack development integration (3/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (9/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (7/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (12/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack development integration (1/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (4/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack development integration (5/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr prod (2/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test prod (4/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr dev (4/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test prod (3/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test prod (2/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr prod (4/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (5/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (2/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test prod (1/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test prod (5/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr prod (3/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production integration (1/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (8/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack dev (4/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr dev (3/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack dev (1/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (11/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack dev (5/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production integration (2/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production integration (4/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack dev (2/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr dev (2/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test integration (10/12) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production integration (3/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests when deployed (3/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests when deployed (1/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests when deployed (2/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / Test new tests when deployed (4/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production (4/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test dev (4/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production (3/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production (1/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production (2/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test ppr prod (1/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test dev (2/4) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack dev (3/5) / build

unused import: `TaskInput`

Check warning on line 29 in turbopack/crates/turbo-tasks-memory/src/memory_backend.rs

View workflow job for this annotation

GitHub Actions / test turbopack production integration (5/5) / build

unused import: `TaskInput`
ValueTypeId, TRANSIENT_TASK_BIT,
};

use crate::{
Expand Down Expand Up @@ -272,8 +272,13 @@ impl MemoryBackend {
drop(entry);
unsafe {
task_storage.remove(index);
let new_id = Unused::new_unchecked(new_id);
turbo_tasks.reuse_persistent_task_id(new_id);
if new_id.is_transient() {
let new_id = Unused::new_unchecked(new_id);
turbo_tasks.reuse_transient_task_id(new_id);
} else {
let new_id = Unused::new_unchecked(new_id);
turbo_tasks.reuse_persistent_task_id(new_id);
}
}
task_id
}
Expand Down

0 comments on commit 95c0326

Please sign in to comment.