diff options
author | Brett Nawrocki <brett.nawrocki@mongodb.com> | 2021-09-29 20:03:54 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-11 22:18:45 +0000 |
commit | b9e2784da82fef8e45b95b88e4ac1443649a5b0c (patch) | |
tree | bdb263ccff6e623bc14f136b469c39bfd6fb164f /buildscripts | |
parent | 4b7f6618db153a5042d9326e7b1e4be98387df9e (diff) | |
download | mongo-b9e2784da82fef8e45b95b88e4ac1443649a5b0c.tar.gz |
SERVER-59927 Add retry to _restoreMetrics()
RecipientStateMachine::_restoreMetrics() performs a number of read
operations to calculate the number of documents it cloned, oplog entries
it fetched, and oplog entries it applied at the beginning of starting to
run again. These read operations may be interrupted if the primary steps
down shortly after having been stepped up, which eventually leads to an
fassert(). Therefore, perform _restoreMetrics() in a
resharding::WithAutomaticRetry() block so any transient errors can be
automatically retried and synchronized with the stepdown token being
canceled.
Furthermore, refactor RecipientStateMachine to use new
RetryingCancelableOperationContextFactory to ensure that all usages of
CancelableOperationContextFactory occur within a
resharding::WithAutomaticRetry() block.
Additionally, add a test case that will cover the _restoreMetrics() read
operations being interrupted.
Diffstat (limited to 'buildscripts')
0 files changed, 0 insertions, 0 deletions