SERVER-77158 enable low risk clang tidy perf rules
This commit is contained in:
parent
826cd336af
commit
6bca906425
@ -58,6 +58,9 @@ Checks: '-*,
|
||||
performance-implicit-conversion-in-loop,
|
||||
performance-inefficient-algorithm,
|
||||
performance-no-automatic-move,
|
||||
performance-type-promotion-in-math-fn,
|
||||
performance-move-constructor-init,
|
||||
performance-trivially-destructible,
|
||||
bugprone-signed-char-misuse,
|
||||
bugprone-suspicious-string-compare,
|
||||
performance-for-range-copy,
|
||||
@ -114,8 +117,6 @@ Checks: '-*,
|
||||
-modernize-use-uncaught-exceptions,
|
||||
-performance-inefficient-string-concatenation,
|
||||
-performance-inefficient-vector-operation,
|
||||
-performance-move-constructor-init,
|
||||
-performance-type-promotion-in-math-fn,
|
||||
-performance-unnecessary-value-param,
|
||||
-readability-delete-null-pointer,
|
||||
-readability-deleted-default,
|
||||
|
||||
@ -324,8 +324,6 @@ void getSplitCandidatesToEnforceZoneRanges(const ChunkManager& cm,
|
||||
BalancerChunkSelectionPolicy::BalancerChunkSelectionPolicy(ClusterStatistics* clusterStats)
|
||||
: _clusterStats(clusterStats) {}
|
||||
|
||||
BalancerChunkSelectionPolicy::~BalancerChunkSelectionPolicy() = default;
|
||||
|
||||
StatusWith<SplitInfoVector> BalancerChunkSelectionPolicy::selectChunksToSplit(
|
||||
OperationContext* opCtx) {
|
||||
auto shardStatsStatus = _clusterStats->getStats(opCtx);
|
||||
|
||||
@ -55,8 +55,7 @@ class BalancerChunkSelectionPolicy {
|
||||
BalancerChunkSelectionPolicy& operator=(const BalancerChunkSelectionPolicy&) = delete;
|
||||
|
||||
public:
|
||||
BalancerChunkSelectionPolicy(ClusterStatistics* clusterStats);
|
||||
~BalancerChunkSelectionPolicy();
|
||||
explicit BalancerChunkSelectionPolicy(ClusterStatistics* clusterStats);
|
||||
|
||||
/**
|
||||
* Potentially blocking method, which gives out a set of chunks, which need to be split because
|
||||
|
||||
@ -77,10 +77,6 @@ const auto shardingLogging = ServiceContext::declareDecoration<ShardingLogging>(
|
||||
|
||||
} // namespace
|
||||
|
||||
ShardingLogging::ShardingLogging() = default;
|
||||
|
||||
ShardingLogging::~ShardingLogging() = default;
|
||||
|
||||
ShardingLogging* ShardingLogging::get(ServiceContext* serviceContext) {
|
||||
return &shardingLogging(serviceContext);
|
||||
}
|
||||
|
||||
@ -48,11 +48,7 @@ namespace mongo {
|
||||
* Diagnostic logging of sharding metadata events (changelog and actionlog).
|
||||
*/
|
||||
class ShardingLogging {
|
||||
|
||||
public:
|
||||
ShardingLogging();
|
||||
~ShardingLogging();
|
||||
|
||||
/**
|
||||
* Retrieves the ShardingLogging instance associated with the current service/operation context.
|
||||
*/
|
||||
|
||||
@ -295,9 +295,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
ScopedCheckedOutSession(ScopedCheckedOutSession&& other)
|
||||
ScopedCheckedOutSession(ScopedCheckedOutSession&& other) noexcept
|
||||
: _catalog(other._catalog),
|
||||
_clientTxnNumberStartedAndProvenance(other._clientTxnNumberStartedAndProvenance),
|
||||
_clientTxnNumberStartedAndProvenance(
|
||||
std::move(other._clientTxnNumberStartedAndProvenance)),
|
||||
_sri(other._sri),
|
||||
_session(other._session),
|
||||
_killToken(std::move(other._killToken)) {
|
||||
|
||||
@ -93,12 +93,12 @@ TaskExecutorCursor::TaskExecutorCursor(std::shared_ptr<executor::TaskExecutor> e
|
||||
_processResponse(rcr.opCtx, std::move(response));
|
||||
}
|
||||
|
||||
TaskExecutorCursor::TaskExecutorCursor(TaskExecutorCursor&& other)
|
||||
TaskExecutorCursor::TaskExecutorCursor(TaskExecutorCursor&& other) noexcept
|
||||
: _executor(std::move(other._executor)),
|
||||
_underlyingExecutor(std::move(other._underlyingExecutor)),
|
||||
_rcr(other._rcr),
|
||||
_rcr(other._rcr), // NOLINT
|
||||
_options(std::move(other._options)),
|
||||
_lsid(other._lsid),
|
||||
_lsid(other._lsid), // NOLINT
|
||||
_cmdState(std::move(other._cmdState)),
|
||||
_cursorId(other._cursorId),
|
||||
_millisecondsWaiting(other._millisecondsWaiting),
|
||||
|
||||
@ -128,7 +128,7 @@ public:
|
||||
/**
|
||||
* Move constructor to enable storing cursors in vectors.
|
||||
*/
|
||||
TaskExecutorCursor(TaskExecutorCursor&& other);
|
||||
TaskExecutorCursor(TaskExecutorCursor&& other) noexcept;
|
||||
|
||||
/**
|
||||
* Asynchronously kills async ops and kills the underlying cursor on destruction.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user