Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 8c463d0

Browse files
tseip-mongoEvergreen Agent
authored andcommitted
SERVER-53230: Rename cancelation -> cancellation everywhere
1 parent f447e57 commit 8c463d0

File tree

102 files changed

+717
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+717
-713
lines changed

docs/primary_only_service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Instance is explicitly interrupted, so that it can unblock any work running on t
9191
*not* a part of an executor owned by the PrimaryOnlyService that are dependent on that Instance
9292
signaling them (e.g. commands that are waiting on the Instance to reach a certain state). Currently
9393
this happens via a call to an interrupt() method that each Instance must override, but in the future
94-
this is likely to change to signaling a CancelationToken owned by the Instance instead.
94+
this is likely to change to signaling a CancellationToken owned by the Instance instead.
9595

9696
## Instance lifetime
9797

jstests/replsets/tenant_migration_abort_forget_retry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if (!tenantMigrationTest.isFeatureFlagEnabled()) {
8989
assert.soon(() => {
9090
const res = assert.commandWorked(donorPrimary.adminCommand(
9191
{currentOp: true, desc: "tenant donor migration", tenantId: tenantId}));
92-
return res.inprog[0].receivedCancelation;
92+
return res.inprog[0].receivedCancellation;
9393
});
9494

9595
fp.off();

jstests/replsets/tenant_migration_donor_interrupt_on_stepdown_and_shutdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function testDonorAbortMigrationInterrupt(interruptFunc, verifyCmdResponseFunc,
146146
assert.soon(() => {
147147
const res = assert.commandWorked(
148148
donorPrimary.adminCommand({currentOp: true, desc: "tenant donor migration"}));
149-
return res.inprog[0].receivedCancelation;
149+
return res.inprog[0].receivedCancellation;
150150
});
151151

152152
interruptFunc(donorRst, migrationId, migrationOpts.tenantId);

jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ function testDonorAbortMigrationInterrupt(interruptFunc, fpName, isShutdown = fa
252252
assert.soon(() => {
253253
const res = assert.commandWorked(
254254
donorPrimary.adminCommand({currentOp: true, desc: "tenant donor migration"}));
255-
return res.inprog[0].receivedCancelation;
255+
return res.inprog[0].receivedCancellation;
256256
});
257257

258258
interruptFunc(donorRst);

jstests/replsets/tenant_migration_donor_try_abort.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
242242
assert.soon(() => {
243243
const res = assert.commandWorked(tmt.getDonorPrimary().adminCommand(
244244
{currentOp: true, desc: "tenant donor migration", tenantId: tenantId}));
245-
return res.inprog[0].receivedCancelation;
245+
return res.inprog[0].receivedCancellation;
246246
});
247247
barrierBeforeFetchingKeys.off();
248248

@@ -351,7 +351,7 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
351351
assert.soon(() => {
352352
const res = assert.commandWorked(donorPrimary.adminCommand(
353353
{currentOp: true, desc: "tenant donor migration", tenantId: tenantId}));
354-
return res.inprog[0].receivedCancelation;
354+
return res.inprog[0].receivedCancellation;
355355
});
356356

357357
fp.off();
@@ -399,7 +399,7 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
399399
assert.soon(() => {
400400
const res = assert.commandWorked(donorPrimary.adminCommand(
401401
{currentOp: true, desc: "tenant donor migration", tenantId: tenantId}));
402-
return res.inprog[0].receivedCancelation;
402+
return res.inprog[0].receivedCancellation;
403403
});
404404

405405
fp.off();

src/mongo/base/error_codes.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ error_categories:
1212
- NeedRetargettingError
1313
- WriteConcernError
1414
- ShutdownError
15-
# isCancelationError() includes all codes that,when passed to a function as its parameter
15+
# isCancellationError() includes all codes that,when passed to a function as its parameter
1616
# indicates that it cannot be executed as normal and must abort its intended work.
17-
- CancelationError
17+
- CancellationError
1818
- ConnectionFatalMessageParseError
1919
- ExceededTimeLimitError
2020
- SnapshotError
@@ -122,10 +122,10 @@ error_codes:
122122
- {code: 87,name: CannotSplit}
123123
- {code: 88,name: OBSOLETE_SplitFailed}
124124
- {code: 89,name: NetworkTimeout,categories: [NetworkError,RetriableError,NetworkTimeoutError]}
125-
- {code: 90,name: CallbackCanceled,categories: [CancelationError]}
125+
- {code: 90,name: CallbackCanceled,categories: [CancellationError]}
126126
- {code: 91,name: ShutdownInProgress,
127127
extra: ShutdownInProgressQuiesceInfo,
128-
categories: [ShutdownError,CancelationError,RetriableError],
128+
categories: [ShutdownError,CancellationError,RetriableError],
129129
extraIsOptional: True}
130130
- {code: 92,name: SecondaryAheadOfPrimary}
131131
- {code: 93,name: InvalidReplicaSetConfig}
@@ -368,10 +368,10 @@ error_codes:
368368
- {code: 307,name: RangeDeletionAbandonedBecauseTaskDocumentDoesNotExist}
369369
- {code: 308,name: CurrentConfigNotCommittedYet}
370370
- {code: 309,name: ExhaustCommandFinished}
371-
- {code: 310,name: PeriodicJobIsStopped,categories: [CancelationError]}
371+
- {code: 310,name: PeriodicJobIsStopped,categories: [CancellationError]}
372372

373373
- {code: 311,name: TransactionCoordinatorCanceled,categories: [InternalOnly]}
374-
- {code: 312,name: OperationIsKilledAndDelisted,categories: [CancelationError,InternalOnly]}
374+
- {code: 312,name: OperationIsKilledAndDelisted,categories: [CancellationError,InternalOnly]}
375375

376376
- {code: 313,name: ResumableRangeDeleterDisabled}
377377
- {code: 314,name: ObjectIsBusy}
@@ -409,7 +409,7 @@ error_codes:
409409

410410
- {code: 332, name: CannotDowngrade}
411411

412-
- {code: 333, name: ServiceExecutorInShutdown, categories: [ShutdownError,CancelationError,InternalOnly]}
412+
- {code: 333, name: ServiceExecutorInShutdown, categories: [ShutdownError,CancellationError,InternalOnly]}
413413
- {code: 334, name: MechanismUnavailable}
414414

415415
- {code: 335, name: TenantMigrationForgotten}
@@ -429,7 +429,7 @@ error_codes:
429429
- {code: 10107,name: NotWritablePrimary,categories: [NotPrimaryError,RetriableError]}
430430
- {code: 10334,name: BSONObjectTooLarge}
431431
- {code: 11000,name: DuplicateKey,extra: DuplicateKeyErrorInfo}
432-
- {code: 11600,name: InterruptedAtShutdown,categories: [Interruption,ShutdownError,CancelationError,RetriableError]}
432+
- {code: 11600,name: InterruptedAtShutdown,categories: [Interruption,ShutdownError,CancellationError,RetriableError]}
433433
- {code: 11601,name: Interrupted,categories: [Interruption]}
434434
- {code: 11602,name: InterruptedDueToReplStateChange,categories: [Interruption,NotPrimaryError,RetriableError]}
435435
- {code: 12586,name: BackgroundOperationInProgressForDatabase}
@@ -444,5 +444,5 @@ error_codes:
444444
- {code: 13436,name: NotPrimaryOrSecondary,categories: [NotPrimaryError,RetriableError]}
445445
- {code: 14031,name: OutOfDiskSpace}
446446
- {code: 17280,name: OBSOLETE_KeyTooLong}
447-
- {code: 46841,name: ClientMarkedKilled,categories: [Interruption,CancelationError]}
447+
- {code: 46841,name: ClientMarkedKilled,categories: [Interruption,CancellationError]}
448448

src/mongo/client/dbclient_rs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Status DBClientReplicaSet::connect() {
423423
// Returns true if there are any up hosts.
424424
const ReadPreferenceSetting anyUpHost(ReadPreference::Nearest, TagSet());
425425
return _getMonitor()
426-
->getHostOrRefresh(anyUpHost, CancelationToken::uncancelable())
426+
->getHostOrRefresh(anyUpHost, CancellationToken::uncancelable())
427427
.getNoThrow()
428428
.getStatus();
429429
}
@@ -763,7 +763,7 @@ DBClientConnection* DBClientReplicaSet::selectNodeUsingTags(
763763
ReplicaSetMonitorPtr monitor = _getMonitor();
764764

765765
auto selectedNodeStatus =
766-
monitor->getHostOrRefresh(*readPref, CancelationToken::uncancelable()).getNoThrow();
766+
monitor->getHostOrRefresh(*readPref, CancellationToken::uncancelable()).getNoThrow();
767767
if (!selectedNodeStatus.isOK()) {
768768
LOGV2_DEBUG(20138,
769769
3,

src/mongo/client/remote_command_targeter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ class RemoteCommandTargeter {
7575
* an OperationContext is available.
7676
*/
7777
virtual SemiFuture<HostAndPort> findHost(const ReadPreferenceSetting& readPref,
78-
const CancelationToken& cancelToken) = 0;
78+
const CancellationToken& cancelToken) = 0;
7979

80-
virtual SemiFuture<std::vector<HostAndPort>> findHosts(const ReadPreferenceSetting& readPref,
81-
const CancelationToken& cancelToken) = 0;
80+
virtual SemiFuture<std::vector<HostAndPort>> findHosts(
81+
const ReadPreferenceSetting& readPref, const CancellationToken& cancelToken) = 0;
8282

8383
/**
8484
* Reports to the targeter that a 'status' indicating a not primary error was received when

src/mongo/client/remote_command_targeter_factory_mock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ class TargeterProxy final : public RemoteCommandTargeter {
4848
}
4949

5050
SemiFuture<HostAndPort> findHost(const ReadPreferenceSetting& readPref,
51-
const CancelationToken& cancelToken) override {
51+
const CancellationToken& cancelToken) override {
5252
return _mock->findHost(readPref, cancelToken);
5353
}
5454

5555
SemiFuture<std::vector<HostAndPort>> findHosts(const ReadPreferenceSetting& readPref,
56-
const CancelationToken& cancelToken) override {
56+
const CancellationToken& cancelToken) override {
5757
return _mock->findHosts(readPref, cancelToken);
5858
}
5959

src/mongo/client/remote_command_targeter_mock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ StatusWith<HostAndPort> RemoteCommandTargeterMock::findHost(OperationContext* op
6060
}
6161

6262
SemiFuture<HostAndPort> RemoteCommandTargeterMock::findHost(const ReadPreferenceSetting&,
63-
const CancelationToken&) {
63+
const CancellationToken&) {
6464
if (!_findHostReturnValue.isOK()) {
6565
return _findHostReturnValue.getStatus();
6666
}
@@ -69,7 +69,7 @@ SemiFuture<HostAndPort> RemoteCommandTargeterMock::findHost(const ReadPreference
6969
}
7070

7171
SemiFuture<std::vector<HostAndPort>> RemoteCommandTargeterMock::findHosts(
72-
const ReadPreferenceSetting&, const CancelationToken&) {
72+
const ReadPreferenceSetting&, const CancellationToken&) {
7373

7474
return _findHostReturnValue;
7575
}

0 commit comments

Comments
 (0)