Skip to content

Commit

Permalink
SERVER-36594 fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
renctan committed Aug 13, 2018
1 parent d394182 commit 5948fb1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
5 changes: 2 additions & 3 deletions src/mongo/s/sharding_task_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ StatusWith<TaskExecutor::CallbackHandle> ShardingTaskExecutor::scheduleRemoteCom

auto clusterGLE = ClusterLastErrorInfo::get(request.opCtx->getClient());

auto shardingCb =
[ timeTracker, clusterGLE, cb, grid = Grid::get(request.opCtx), txnRouter ](
const TaskExecutor::RemoteCommandCallbackArgs& args) {
auto shardingCb = [ timeTracker, clusterGLE, cb, grid = Grid::get(request.opCtx), txnRouter ](
const TaskExecutor::RemoteCommandCallbackArgs& args) {
ON_BLOCK_EXIT([&cb, &args]() { cb(args); });

// Update replica set monitor info.
Expand Down
15 changes: 6 additions & 9 deletions src/mongo/s/transaction/transaction_router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ class RouterSessionCatalog {

private:
stdx::mutex _mutex;
stdx::unordered_map<LogicalSessionId,
std::shared_ptr<TransactionRouter>,
LogicalSessionIdHash>
stdx::unordered_map<LogicalSessionId, std::shared_ptr<TransactionRouter>, LogicalSessionIdHash>
_catalog;
};

Expand Down Expand Up @@ -132,8 +130,8 @@ void appendReadConcernForTxn(BSONObjBuilder* bob, repl::ReadConcernArgs readConc
} // unnamed namespace

TransactionRouter::Participant::Participant(bool isCoordinator,
TxnNumber txnNumber,
repl::ReadConcernArgs readConcernArgs)
TxnNumber txnNumber,
repl::ReadConcernArgs readConcernArgs)
: _isCoordinator(isCoordinator), _txnNumber(txnNumber), _readConcernArgs(readConcernArgs) {}

BSONObj TransactionRouter::Participant::attachTxnFieldsIfNeeded(BSONObj cmd) {
Expand Down Expand Up @@ -205,8 +203,7 @@ boost::optional<ShardId> TransactionRouter::getCoordinatorId() const {
return _coordinatorId;
}

TransactionRouter::Participant& TransactionRouter::getOrCreateParticipant(
const ShardId& shard) {
TransactionRouter::Participant& TransactionRouter::getOrCreateParticipant(const ShardId& shard) {
auto iter = _participants.find(shard.toString());

if (iter != _participants.end()) {
Expand Down Expand Up @@ -235,8 +232,8 @@ const LogicalSessionId& TransactionRouter::getSessionId() const {
}

void TransactionRouter::beginOrContinueTxn(OperationContext* opCtx,
TxnNumber txnNumber,
bool startTransaction) {
TxnNumber txnNumber,
bool startTransaction) {
invariant(_isCheckedOut);

if (startTransaction) {
Expand Down
3 changes: 1 addition & 2 deletions src/mongo/s/transaction/transaction_router_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,7 @@ TEST_F(TransactionRouterTest, CannotUpconvertIfLevelOtherThanSnapshotWasGiven) {
}
}

TEST_F(TransactionRouterTest,
CannotUpconvertIfLevelOtherThanSnapshotWasGivenWithAfterClusterTime) {
TEST_F(TransactionRouterTest, CannotUpconvertIfLevelOtherThanSnapshotWasGivenWithAfterClusterTime) {
auto readConcernLevels = {repl::ReadConcernLevel::kLocalReadConcern,
repl::ReadConcernLevel::kMajorityReadConcern,
repl::ReadConcernLevel::kLinearizableReadConcern,
Expand Down

0 comments on commit 5948fb1

Please sign in to comment.