Skip to content

Commit 503e4f7

Browse files
committed
Revert expiration for retry lanes (facebook#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 018333d commit 503e4f7

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
@@ -443,12 +443,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
443443
case TransitionLane14:
444444
case TransitionLane15:
445445
case TransitionLane16:
446+
return currentTime + 5000;
446447
case RetryLane1:
447448
case RetryLane2:
448449
case RetryLane3:
449450
case RetryLane4:
450451
case RetryLane5:
451-
return currentTime + 5000;
452+
// TODO: Retries should be allowed to expire if they are CPU bound for
453+
// too long, but when I made this change it caused a spike in browser
454+
// crashes. There must be some other underlying bug; not super urgent but
455+
// ideally should figure out why and fix it. Unfortunately we don't have
456+
// a repro for the crashes, only detected via production metrics.
457+
return NoTimestamp;
452458
case SelectiveHydrationLane:
453459
case IdleHydrationLane:
454460
case IdleLane:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,18 @@ function computeExpirationTime(lane: Lane, currentTime: number) {
443443
case TransitionLane14:
444444
case TransitionLane15:
445445
case TransitionLane16:
446+
return currentTime + 5000;
446447
case RetryLane1:
447448
case RetryLane2:
448449
case RetryLane3:
449450
case RetryLane4:
450451
case RetryLane5:
451-
return currentTime + 5000;
452+
// TODO: Retries should be allowed to expire if they are CPU bound for
453+
// too long, but when I made this change it caused a spike in browser
454+
// crashes. There must be some other underlying bug; not super urgent but
455+
// ideally should figure out why and fix it. Unfortunately we don't have
456+
// a repro for the crashes, only detected via production metrics.
457+
return NoTimestamp;
452458
case SelectiveHydrationLane:
453459
case IdleHydrationLane:
454460
case IdleLane:

0 commit comments

Comments
 (0)