SERVER-106210 add server parameter to turn on async oplog (#38510)
GitOrigin-RevId: 0a4a835d3955a6c7e6d903a516bfc2a66fbdafcb
This commit is contained in:
parent
57257d9ad6
commit
e83005b5d4
@ -73,3 +73,11 @@ server_parameters:
|
||||
default: 300
|
||||
validator: {gt: 300}
|
||||
redact: false
|
||||
|
||||
oplogSamplingAsyncEnabled:
|
||||
description: "Whether or not oplog sampling is running asynchronously to startup."
|
||||
set_at: [startup]
|
||||
cpp_vartype: "bool"
|
||||
cpp_varname: gOplogSamplingAsyncEnabled
|
||||
default: true
|
||||
redact: false
|
||||
|
||||
@ -117,7 +117,12 @@ std::shared_ptr<OplogTruncateMarkers> OplogTruncateMarkers::sampleAndUpdate(Oper
|
||||
|
||||
std::shared_ptr<OplogTruncateMarkers> OplogTruncateMarkers::createOplogTruncateMarkers(
|
||||
OperationContext* opCtx, RecordStore& rs) {
|
||||
if (!feature_flags::gOplogSamplingAsyncEnabled.isEnabled()) {
|
||||
bool samplingAsynchronously =
|
||||
feature_flags::gOplogSamplingAsyncEnabled.isEnabled() && gOplogSamplingAsyncEnabled;
|
||||
LOGV2(10621000,
|
||||
"Creating oplog markers",
|
||||
"sampling asynchronously"_attr = samplingAsynchronously);
|
||||
if (!samplingAsynchronously) {
|
||||
return sampleAndUpdate(opCtx, rs);
|
||||
}
|
||||
return createEmptyOplogTruncateMarkers(rs);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user