Skip to content

Commit ed60c64

Browse files
committed
Revert expiration for retry lanes
Retries should be allowed to expire if they are CPU bound for too long, but when I made this change it caused a spike in browser crashes. There must be some other underlying bug; not super urgent but ideally should figure out why and fix it. Unfortunately we don't have a repro for the crashes, only detected via production metrics.
1 parent b38ac13 commit ed60c64

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

packages/react-reconciler/src/ReactFiberLane.new.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
357357
case TransitionLane14:
358358
case TransitionLane15:
359359
case TransitionLane16:
360+
return currentTime + 5000;
360361
case RetryLane1:
361362
case RetryLane2:
362363
case RetryLane3:
363364
case RetryLane4:
364365
case RetryLane5:
365-
return currentTime + 5000;
366+
// TODO: Retries should be allowed to expire if they are CPU bound for
367+
// too long, but when I made this change it caused a spike in browser
368+
// crashes. There must be some other underlying bug; not super urgent but
369+
// ideally should figure out why and fix it. Unfortunately we don't have
370+
// a repro for the crashes, only detected via production metrics.
371+
return NoTimestamp;
366372
case SelectiveHydrationLane:
367373
case IdleHydrationLane:
368374
case IdleLane:

packages/react-reconciler/src/ReactFiberLane.old.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
357357
case TransitionLane14:
358358
case TransitionLane15:
359359
case TransitionLane16:
360+
return currentTime + 5000;
360361
case RetryLane1:
361362
case RetryLane2:
362363
case RetryLane3:
363364
case RetryLane4:
364365
case RetryLane5:
365-
return currentTime + 5000;
366+
// TODO: Retries should be allowed to expire if they are CPU bound for
367+
// too long, but when I made this change it caused a spike in browser
368+
// crashes. There must be some other underlying bug; not super urgent but
369+
// ideally should figure out why and fix it. Unfortunately we don't have
370+
// a repro for the crashes, only detected via production metrics.
371+
return NoTimestamp;
366372
case SelectiveHydrationLane:
367373
case IdleHydrationLane:
368374
case IdleLane:

0 commit comments

Comments
 (0)