SERVER-102439 Make repl::writeConflictRetryLimit atomic. (#33710)

GitOrigin-RevId: 16b5ffb8d54d48378789a15264de876009e1d5b6
This commit is contained in:
Brad Cater 2025-03-18 17:04:29 -04:00 committed by MongoDB Bot
parent bbf7ada2fc
commit 088d320dd6
2 changed files with 3 additions and 2 deletions

View File

@ -332,7 +332,8 @@ auto writeConflictRetryWithLimit(OperationContext* opCtx,
StringData opStr,
const NamespaceStringOrUUID& nssOrUUID,
F&& f) {
return writeConflictRetry(opCtx, opStr, nssOrUUID, f, repl::writeConflictRetryLimit);
return writeConflictRetry(
opCtx, opStr, nssOrUUID, f, repl::writeConflictRetryLimit.loadRelaxed());
}
} // namespace repl

View File

@ -664,7 +664,7 @@ server_parameters:
The number of retries that be made by writeConflictRetry(). It is used in secondary
oplog application to catch unexpected behavior.
set_at: [ startup, runtime ]
cpp_vartype: int
cpp_vartype: AtomicWord<int>
cpp_varname: writeConflictRetryLimit
default: 10000
validator: