You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changefeedccl: fix race advancing frontier in schemafeed
In the schema feed, when in `updateTableHistory`, we check that the
current frontier is less than the current time. However, since we
release the mutex protecting frontier while validating table
descriptors, it's possible for another routine to advance the frontier
before the first routine tries to advance it. For example, another
routine may call pauseOrResumePolling and pause polling at the same time
it advances the frontier. As a consequence, it's possible for the first
routine to assert fail due to the current frontier being greater than
the current time when it tries to advance it.
This change fixes this race by checking that the frontier is greater
than the current time (endTS) again before trying to advance the
frontier. If the frontier is less than or equal to the current time, the
frontier does not need to be advanced and it returns. It's worth keeping
the original check in, since it avoids the need to validate descriptors,
and releasing the mutex also prevents the routine from holding it while
validating.
Epic: none
Fixes: #148963
Release note (bug fix): Fixes a race condition when advancing a
changefeed aggregator's frontier. When hit, the race condition could
result in an internal error that would shut down the kvfeed and cause
the changefeed to retry.
0 commit comments