Unverified Commit 5f47bb15 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

[Turbopack] only the first task read need to be strongly consistent (#75435)

### What?

see code comment
parent c97dff9b
......@@ -209,7 +209,7 @@ impl RawVc {
self.resolve_inner(ReadConsistency::Strong).await
}
async fn resolve_inner(self, consistency: ReadConsistency) -> Result<RawVc> {
async fn resolve_inner(self, mut consistency: ReadConsistency) -> Result<RawVc> {
let tt = turbo_tasks();
let mut current = self;
let mut notified = false;
......@@ -221,6 +221,10 @@ impl RawVc {
notified = true;
}
current = read_task_output(&*tt, task, consistency).await?;
// We no longer need to read strongly consistent, as any Vc returned
// from the first task will be inside of the scope of the first
// task. So it's already strongly consistent.
consistency = ReadConsistency::Eventual;
}
RawVc::TaskCell(_, _) => return Ok(current),
RawVc::LocalOutput(task_id, local_cell_id) => {
......@@ -396,8 +400,7 @@ impl Future for ReadRawVcFuture {
Ok(Ok(vc)) => {
// We no longer need to read strongly consistent, as any Vc returned
// from the first task will be inside of the scope of the first
// task. So it's already strongly
// consistent.
// task. So it's already strongly consistent.
this.consistency = ReadConsistency::Eventual;
this.current = vc;
continue 'outer;
......
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