summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Zhou <sarah.zhou@mongodb.com>2020-11-23 23:04:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-25 00:57:16 +0000
commit841ad08df9b8e687777d4a11251ef83a13ab9659 (patch)
tree8e88a9b429c24ce64e7bcfdb41426c94f285d4b8
parent322d6dc73aac61c675d00ee0e45bedecbc286f4d (diff)
downloadmongo-841ad08df9b8e687777d4a11251ef83a13ab9659.tar.gz
SERVER-52971 Correct spelling for 'nofity' in ParticipantsToNofityEnum
-rw-r--r--src/mongo/db/s/resharding/resharding_coordinator_service.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
index 2e9b66818b6..be8ff0ee705 100644
--- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
+++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp
@@ -399,18 +399,18 @@ std::vector<ShardId> extractShardIds(const std::vector<T>& participantShardEntri
/**
* Maps which participants are to be notified when the coordinator transitions into a given state.
*/
-enum class ParticipantsToNofityEnum { kDonors, kRecipients, kAllParticipantsPostCommit, kNone };
-stdx::unordered_map<CoordinatorStateEnum, ParticipantsToNofityEnum> notifyForStateTransition{
- {CoordinatorStateEnum::kUnused, ParticipantsToNofityEnum::kNone},
- {CoordinatorStateEnum::kInitializing, ParticipantsToNofityEnum::kNone},
- {CoordinatorStateEnum::kPreparingToDonate, ParticipantsToNofityEnum::kDonors},
- {CoordinatorStateEnum::kCloning, ParticipantsToNofityEnum::kRecipients},
- {CoordinatorStateEnum::kApplying, ParticipantsToNofityEnum::kDonors},
- {CoordinatorStateEnum::kMirroring, ParticipantsToNofityEnum::kDonors},
- {CoordinatorStateEnum::kCommitted, ParticipantsToNofityEnum::kNone},
- {CoordinatorStateEnum::kRenaming, ParticipantsToNofityEnum::kAllParticipantsPostCommit},
- {CoordinatorStateEnum::kDone, ParticipantsToNofityEnum::kNone},
- {CoordinatorStateEnum::kError, ParticipantsToNofityEnum::kNone},
+enum class ParticipantsToNotifyEnum { kDonors, kRecipients, kAllParticipantsPostCommit, kNone };
+stdx::unordered_map<CoordinatorStateEnum, ParticipantsToNotifyEnum> notifyForStateTransition{
+ {CoordinatorStateEnum::kUnused, ParticipantsToNotifyEnum::kNone},
+ {CoordinatorStateEnum::kInitializing, ParticipantsToNotifyEnum::kNone},
+ {CoordinatorStateEnum::kPreparingToDonate, ParticipantsToNotifyEnum::kDonors},
+ {CoordinatorStateEnum::kCloning, ParticipantsToNotifyEnum::kRecipients},
+ {CoordinatorStateEnum::kApplying, ParticipantsToNotifyEnum::kDonors},
+ {CoordinatorStateEnum::kMirroring, ParticipantsToNotifyEnum::kDonors},
+ {CoordinatorStateEnum::kCommitted, ParticipantsToNotifyEnum::kNone},
+ {CoordinatorStateEnum::kRenaming, ParticipantsToNotifyEnum::kAllParticipantsPostCommit},
+ {CoordinatorStateEnum::kDone, ParticipantsToNotifyEnum::kNone},
+ {CoordinatorStateEnum::kError, ParticipantsToNotifyEnum::kNone},
};
/**
@@ -426,7 +426,7 @@ void executeStateTransitionAndMetadataChangesInTxn(
unique_function<void(OperationContext*, TxnNumber)> changeMetadataFunc) {
const auto& state = updatedCoordinatorDoc.getState();
invariant(notifyForStateTransition.find(state) != notifyForStateTransition.end());
- invariant(notifyForStateTransition[state] == ParticipantsToNofityEnum::kNone);
+ invariant(notifyForStateTransition[state] == ParticipantsToNotifyEnum::kNone);
// Neither donors nor recipients need to be informed of the transition to
// updatedCoordinatorDoc's state.
@@ -451,10 +451,10 @@ void bumpShardVersionsThenExecuteStateTransitionAndMetadataChangesInTxn(
unique_function<void(OperationContext*, TxnNumber)> changeMetadataFunc) {
const auto& state = updatedCoordinatorDoc.getState();
invariant(notifyForStateTransition.find(state) != notifyForStateTransition.end());
- invariant(notifyForStateTransition[state] != ParticipantsToNofityEnum::kNone);
+ invariant(notifyForStateTransition[state] != ParticipantsToNotifyEnum::kNone);
auto participantsToNotify = notifyForStateTransition[state];
- if (participantsToNotify == ParticipantsToNofityEnum::kDonors) {
+ if (participantsToNotify == ParticipantsToNotifyEnum::kDonors) {
// Bump the donor shard versions for the original namespace along with updating the
// metadata.
ShardingCatalogManager::get(opCtx)->bumpCollShardVersionsAndChangeMetadataInTxn(
@@ -462,7 +462,7 @@ void bumpShardVersionsThenExecuteStateTransitionAndMetadataChangesInTxn(
updatedCoordinatorDoc.getNss(),
extractShardIds(updatedCoordinatorDoc.getDonorShards()),
std::move(changeMetadataFunc));
- } else if (participantsToNotify == ParticipantsToNofityEnum::kRecipients) {
+ } else if (participantsToNotify == ParticipantsToNotifyEnum::kRecipients) {
// Bump the recipient shard versions for the temporary resharding namespace along with
// updating the metadata.
ShardingCatalogManager::get(opCtx)->bumpCollShardVersionsAndChangeMetadataInTxn(
@@ -470,7 +470,7 @@ void bumpShardVersionsThenExecuteStateTransitionAndMetadataChangesInTxn(
updatedCoordinatorDoc.getTempReshardingNss(),
extractShardIds(updatedCoordinatorDoc.getRecipientShards()),
std::move(changeMetadataFunc));
- } else if (participantsToNotify == ParticipantsToNofityEnum::kAllParticipantsPostCommit) {
+ } else if (participantsToNotify == ParticipantsToNotifyEnum::kAllParticipantsPostCommit) {
// Bump the recipient shard versions for the original resharding namespace along with
// updating the metadata. Only the recipient shards will have chunks for the namespace
// after commit, bumping chunk versions on the donor shards would not apply.
@@ -571,7 +571,7 @@ void persistStateTransitionAndCatalogUpdatesThenBumpShardVersions(
invariant(notifyForStateTransition.find(nextState) != notifyForStateTransition.end());
// TODO SERVER-51800 Remove special casing for kError.
invariant(nextState == CoordinatorStateEnum::kError ||
- notifyForStateTransition[nextState] != ParticipantsToNofityEnum::kNone);
+ notifyForStateTransition[nextState] != ParticipantsToNotifyEnum::kNone);
// Resharding metadata changes to be executed.
auto changeMetadataFunc = [&](OperationContext* opCtx, TxnNumber txnNumber) {