Skip to content

Commit af1a4cb

Browse files
authored
Revert expiration for retry lanes (#21300)
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 c3cb2c2 commit af1a4cb

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
@@ -362,12 +362,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
362362
case TransitionLane14:
363363
case TransitionLane15:
364364
case TransitionLane16:
365+
return currentTime + 5000;
365366
case RetryLane1:
366367
case RetryLane2:
367368
case RetryLane3:
368369
case RetryLane4:
369370
case RetryLane5:
370-
return currentTime + 5000;
371+
// TODO: Retries should be allowed to expire if they are CPU bound for
372+
// too long, but when I made this change it caused a spike in browser
373+
// crashes. There must be some other underlying bug; not super urgent but
374+
// ideally should figure out why and fix it. Unfortunately we don't have
375+
// a repro for the crashes, only detected via production metrics.
376+
return NoTimestamp;
371377
case SelectiveHydrationLane:
372378
case IdleHydrationLane:
373379
case IdleLane:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
362362
case TransitionLane14:
363363
case TransitionLane15:
364364
case TransitionLane16:
365+
return currentTime + 5000;
365366
case RetryLane1:
366367
case RetryLane2:
367368
case RetryLane3:
368369
case RetryLane4:
369370
case RetryLane5:
370-
return currentTime + 5000;
371+
// TODO: Retries should be allowed to expire if they are CPU bound for
372+
// too long, but when I made this change it caused a spike in browser
373+
// crashes. There must be some other underlying bug; not super urgent but
374+
// ideally should figure out why and fix it. Unfortunately we don't have
375+
// a repro for the crashes, only detected via production metrics.
376+
return NoTimestamp;
371377
case SelectiveHydrationLane:
372378
case IdleHydrationLane:
373379
case IdleLane:

0 commit comments

Comments
 (0)