Skip to content

Commit a88114c

Browse files
committed
Fix typos
1 parent 02182d5 commit a88114c

File tree

240 files changed

+556
-555
lines changed

Some content is hidden

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

240 files changed

+556
-555
lines changed

Diff for: SWIFT_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ knobs.MAX_VERSION_RATE_MODIFIER
176176

177177
#### Bridging reference types
178178

179-
Some C++ types have reference counting and referencial semantics, i.e. they're passed around using raw or smart pointers that point to an instance. That instance typically has its own reference count, that keeps track of when the instance should be released. Such types can be bridged over to Swift reference types, and Swift's automatic reference counting (ARC) will automatically retain and release them using their C++ reference counting implementation.
179+
Some C++ types have reference counting and referential semantics, i.e. they're passed around using raw or smart pointers that point to an instance. That instance typically has its own reference count, that keeps track of when the instance should be released. Such types can be bridged over to Swift reference types, and Swift's automatic reference counting (ARC) will automatically retain and release them using their C++ reference counting implementation.
180180

181181
You can use the `SWIFT_CXX_REF` annotation for that. Right now `SWIFT_CXX_REF` does not work (due to https://github.com/apple/swift/issues/61620), so you have to make a custom annotation for each class you want to bridge with reference semantics to Swift. For example, the `MasterData` class receives the following annotation:
182182

Diff for: bindings/bindingtester/bindingtester.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def killProc():
482482
if timed_out.is_set():
483483
reason = "timed out after %d seconds" % (self.args.timeout,)
484484
util.get_logger().error(
485-
"\n'%s' did not complete succesfully (%s)" % (params[0], reason)
485+
"\n'%s' did not complete successfully (%s)" % (params[0], reason)
486486
)
487487

488488
util.get_logger().info("")

Diff for: bindings/c/test/apitester/TesterTestSpec.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct WorkloadSpec {
3838
std::unordered_map<std::string, std::string> options;
3939
};
4040

41-
// Test speficification loaded from a *.toml file
41+
// Test specification loaded from a *.toml file
4242
struct TestSpec {
4343
// Title of the test
4444
std::string title;
@@ -97,7 +97,7 @@ struct TestSpec {
9797
std::vector<WorkloadSpec> workloads;
9898
};
9999

100-
// Read the test specfication from a *.toml file
100+
// Read the test specification from a *.toml file
101101
TestSpec readTomlTestSpec(std::string fileName);
102102

103103
} // namespace FdbApiTester

Diff for: bindings/c/test/apitester/TesterTransactionExecutor.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class TransactionContextBase : public ITransactionContext {
320320
}
321321

322322
// Pointer to the transaction executor interface
323-
// Set in contructor, stays immutable
323+
// Set in constructor, stays immutable
324324
ITransactionExecutor* const executor;
325325

326326
// FDB database
@@ -344,21 +344,21 @@ class TransactionContextBase : public ITransactionContext {
344344
TOpStartFct startFct;
345345

346346
// Mutex protecting access to shared mutable state
347-
// Only the state that is accessible unter IN_PROGRESS state
347+
// Only the state that is accessible under IN_PROGRESS state
348348
// must be protected by mutex
349349
std::mutex mutex;
350350

351351
// Continuation to be called after completion of the transaction
352-
// Set in contructor, stays immutable
352+
// Set in constructor, stays immutable
353353
const TOpContFct contAfterDone;
354354

355355
// Reference to the scheduler
356-
// Set in contructor, stays immutable
356+
// Set in constructor, stays immutable
357357
// Cannot be accessed in DONE state, workloads can be completed and the scheduler deleted
358358
IScheduler* const scheduler;
359359

360360
// Retry limit
361-
// Set in contructor, stays immutable
361+
// Set in constructor, stays immutable
362362
const int retryLimit;
363363

364364
// Transaction execution state
@@ -386,7 +386,7 @@ class TransactionContextBase : public ITransactionContext {
386386
std::vector<fdb::Error> retriedErrors;
387387

388388
// blob granule base path
389-
// Set in contructor, stays immutable
389+
// Set in constructor, stays immutable
390390
const std::string bgBasePath;
391391

392392
// Indicates if the database error was injected

Diff for: bindings/c/test/apitester/TesterWorkload.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void WorkloadManager::run() {
226226
if (failed()) {
227227
fmt::print(stderr, "{} workloads failed\n", numWorkloadsFailed);
228228
} else {
229-
fprintf(stderr, "All workloads succesfully completed\n");
229+
fprintf(stderr, "All workloads successfully completed\n");
230230
}
231231
}
232232

Diff for: bindings/c/test/apitester/TesterWorkload.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ class IWorkloadControlIfc {
4646
virtual void checkProgress() = 0;
4747
};
4848

49-
// Workoad interface
49+
// Workload interface
5050
class IWorkload {
5151
public:
5252
virtual ~IWorkload() {}
5353

54-
// Intialize the workload
54+
// Initialize the workload
5555
virtual void init(WorkloadManager* manager) = 0;
5656

5757
// Start executing the workload
@@ -73,7 +73,7 @@ class IWorkload {
7373

7474
// Workload configuration
7575
struct WorkloadConfig {
76-
// Workoad name
76+
// Workload name
7777
std::string name;
7878

7979
// Client ID assigned to the workload (a number from 0 to numClients-1)
@@ -136,7 +136,7 @@ class WorkloadBase : public IWorkload {
136136
// Log an info message
137137
void info(const std::string& msg);
138138

139-
// Confirm a successfull progress check
139+
// Confirm a successful progress check
140140
void confirmProgress();
141141

142142
private:
@@ -166,7 +166,7 @@ class WorkloadBase : public IWorkload {
166166
// Total number of clients
167167
int numClients;
168168

169-
// The maximum number of errors before stoppoing the workload
169+
// The maximum number of errors before stopping the workload
170170
int maxErrors;
171171

172172
// The timeout (in ms) automatically set for all transactions to a random value
@@ -187,12 +187,12 @@ class WorkloadBase : public IWorkload {
187187
// Number of started transactions
188188
std::atomic<int> numTxStarted;
189189

190-
// Workload is in progress (intialized, but not completed)
190+
// Workload is in progress (initialized, but not completed)
191191
std::atomic<bool> inProgress;
192192
};
193193

194194
// Workload manager
195-
// Keeps track of active workoads, stops the scheduler after all workloads complete
195+
// Keeps track of active workloads, stops the scheduler after all workloads complete
196196
class WorkloadManager {
197197
public:
198198
WorkloadManager(ITransactionExecutor* txExecutor, IScheduler* scheduler)
@@ -214,15 +214,15 @@ class WorkloadManager {
214214
return numWorkloadsFailed > 0;
215215
}
216216

217-
// Schedule statistics to be printed in regular timeintervals
217+
// Schedule statistics to be printed in regular time intervals
218218
void schedulePrintStatistics(int timeIntervalMs);
219219

220220
private:
221221
friend WorkloadBase;
222222

223223
// Info about a running workload
224224
struct WorkloadInfo {
225-
// Reference to the workoad for ownership
225+
// Reference to the workload for ownership
226226
std::shared_ptr<IWorkload> ref;
227227
// Continuation to be executed after completing the workload
228228
TTaskFct cont;

Diff for: bindings/c/test/apitester/fdb_c_api_tester.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void printProgramUsage(const char* execName) {
9797
" The path of a file containing the connection string for the\n"
9898
" FoundationDB cluster. The default is `fdb.cluster'\n"
9999
" --log Enables trace file logging for the CLI session.\n"
100-
" --log-dir PATH Specifes the output directory for trace files. If\n"
100+
" --log-dir PATH Specifies the output directory for trace files. If\n"
101101
" unspecified, defaults to the current directory. Has\n"
102102
" no effect unless --log is specified.\n"
103103
" --log-group LOG_GROUP\n"
@@ -123,7 +123,7 @@ void printProgramUsage(const char* execName) {
123123
" --api-version VERSION\n"
124124
" Required FDB API version (default %d).\n"
125125
" --transaction-retry-limit NUMBER\n"
126-
" Maximum number of retries per tranaction (default: 0 - unlimited)\n"
126+
" Maximum number of retries per transaction (default: 0 - unlimited)\n"
127127
" --blob-granule-local-file-path PATH\n"
128128
" Path to blob granule files on local filesystem\n"
129129
" -f, --test-file FILE\n"

Diff for: bindings/c/test/apitester/run_c_api_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def run_tester(args, cluster, test_file):
149149
else:
150150
reason = "exit code: %d" % ret_code
151151
get_logger().error(
152-
"\n'%s' did not complete succesfully (%s)" % (cmd[0], reason)
152+
"\n'%s' did not complete successfully (%s)" % (cmd[0], reason)
153153
)
154154
if log_dir is not None and not args.disable_log_dump:
155155
dump_client_logs(log_dir)

Diff for: bindings/c/test/client_config_tester.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void printProgramUsage(const char* execName) {
125125
" --transaction-timeout MILLISECONDS\n"
126126
" The timeout for the test transactions in milliseconds (default: 0 - no timeout)\n"
127127
" --log Enables trace file logging for the CLI session.\n"
128-
" --log-dir PATH Specifes the output directory for trace files. If\n"
128+
" --log-dir PATH Specifies the output directory for trace files. If\n"
129129
" unspecified, defaults to the current directory. Has\n"
130130
" no effect unless --log is specified.\n"
131131
" --tmp-dir DIR\n"

Diff for: bindings/c/test/fdb_c_client_config_tests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def test_external_client_unsupported_api_ignore(self):
598598
class ClientConfigSeparateCluster(unittest.TestCase):
599599
def test_wait_cluster_to_upgrade(self):
600600
# Test starting a client incompatible to a cluster and connecting
601-
# successfuly after cluster upgrade
601+
# successfully after cluster upgrade
602602
self.cluster = TestCluster(PREV_RELEASE_VERSION)
603603
self.cluster.setup()
604604
try:
@@ -639,7 +639,7 @@ def test_tls_cluster_tls_client(self):
639639
self.cluster.tear_down()
640640

641641
def test_plaintext_cluster_tls_client(self):
642-
# Test connecting succesfully to a plaintext cluster with a TLS client
642+
# Test connecting successfully to a plaintext cluster with a TLS client
643643
self.cluster = TestCluster(
644644
CURRENT_VERSION, tls_config=TLSConfig(), disable_server_side_tls=True
645645
)
@@ -677,7 +677,7 @@ def test_tls_cluster_tls_client_plaintext_disabled(self):
677677
self.cluster.tear_down()
678678

679679
def test_plaintext_cluster_tls_client_plaintext_connection_disabled(self):
680-
# Test connecting succesfully to a plaintext cluster with a TLS-configured client with plaintext connections disabled
680+
# Test connecting successfully to a plaintext cluster with a TLS-configured client with plaintext connections disabled
681681
self.cluster = TestCluster(
682682
CURRENT_VERSION, tls_config=TLSConfig(), disable_server_side_tls=True
683683
)
@@ -860,7 +860,7 @@ def find_trace_file(
860860
pattern += "\.\d+\.\w+\.\d+\.\d+\.{}$".format(self.test.trace_format)
861861
if re.match(pattern, name):
862862
return trace_file
863-
self.fail("No maching trace file found")
863+
self.fail("No matching trace file found")
864864

865865
def find_and_check_event(
866866
self, trace_file, event_type, attr_present, attr_missing, seqno=0

Diff for: bindings/c/test/mako/mako.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ void usage() {
12071207
"Duration in milliseconds after which a transaction times out in run mode. Set as transaction option");
12081208
}
12091209

1210-
/* parse benchmark paramters */
1210+
/* parse benchmark parameters */
12111211
int parseArguments(int argc, char* argv[], Arguments& args) {
12121212
int rc;
12131213
int c;
@@ -2519,7 +2519,7 @@ int main(int argc, char* argv[]) {
25192519

25202520
// set --seconds in case no ending condition has been set
25212521
if (args.seconds == 0 && args.iteration == 0) {
2522-
args.seconds = 30; // default value accodring to documentation
2522+
args.seconds = 30; // default value according to documentation
25232523
}
25242524

25252525
// if no cluster file is passed, fall back to default parameters

Diff for: bindings/c/test/mako/utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
namespace mako {
2929

3030
/* return the last key to be inserted */
31-
/* devide val equally among threads */
31+
/* divide val equally among threads */
3232
int computeThreadPortion(int val, int p_idx, int t_idx, int total_p, int total_t) {
3333
int interval = val / total_p / total_t;
3434
int remaining = val - (interval * total_p * total_t);

Diff for: bindings/c/test/mako/utils.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ force_inline int insertBegin(int rows, int p_idx, int t_idx, int total_p, int to
9797
return (int)(round(interval * ((p_idx * total_t) + t_idx)));
9898
}
9999

100-
/* similar to insertBegin, insertEnd returns the last row numer */
100+
/* similar to insertBegin, insertEnd returns the last row number */
101101
force_inline int insertEnd(int rows, int p_idx, int t_idx, int total_p, int total_t) {
102102
double interval = (double)rows / total_p / total_t;
103103
return (int)(round(interval * ((p_idx * total_t) + t_idx + 1) - 1));
104104
}
105105

106-
/* devide a value equally among threads */
106+
/* divide a value equally among threads */
107107
int computeThreadPortion(int val, int p_idx, int t_idx, int total_p, int total_t);
108108

109109
/* similar to insertBegin/end, computeThreadTps computes
@@ -112,7 +112,7 @@ int computeThreadPortion(int val, int p_idx, int t_idx, int total_p, int total_t
112112
#define computeThreadTps(val, p_idx, t_idx, total_p, total_t) computeThreadPortion(val, p_idx, t_idx, total_p, total_t)
113113

114114
/* similar to computeThreadTps,
115-
* computeThreadIters computs the number of iterations.
115+
* computeThreadIters computes the number of iterations.
116116
*/
117117
#define computeThreadIters(val, p_idx, t_idx, total_p, total_t) \
118118
computeThreadPortion(val, p_idx, t_idx, total_p, total_t)

Diff for: bindings/go/godoc-resources/jquery.treeview.css

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@
3939
.treeview .hover { color: red; cursor: pointer; }
4040

4141
.treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; }
42-
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
42+
.treeview li.collapsible, .treeview li.expandable { background-position: 0 -176px; }
4343

4444
.treeview .expandable-hitarea { background-position: -80px -3px; }
4545

4646
.treeview li.last { background-position: 0 -1766px }
47-
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); }
48-
.treeview li.lastCollapsable { background-position: 0 -111px }
47+
.treeview li.lastCollapsible, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); }
48+
.treeview li.lastCollapsible { background-position: 0 -111px }
4949
.treeview li.lastExpandable { background-position: -32px -67px }
5050

51-
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
51+
.treeview div.lastCollapsible-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
5252

5353
.treeview-red li { background-image: url(images/treeview-red-line.gif); }
54-
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); }
54+
.treeview-red .hitarea, .treeview-red li.lastCollapsible, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); }
5555

5656
.treeview-black li { background-image: url(images/treeview-black-line.gif); }
57-
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); }
57+
.treeview-black .hitarea, .treeview-black li.lastCollapsible, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); }
5858

5959
.treeview-gray li { background-image: url(images/treeview-gray-line.gif); }
60-
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); }
60+
.treeview-gray .hitarea, .treeview-gray li.lastCollapsible, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); }
6161

6262
.treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); }
63-
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); }
63+
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsible, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); }
6464

6565
.treeview .placeholder {
6666
background: url(images/ajax-loader.gif) 0 0 no-repeat;

Diff for: bindings/go/godoc-resources/jquery.treeview.edit.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
return proxied.apply(this, arguments).bind("add", function(event, branches) {
1515
$(branches).prev()
1616
.removeClass(CLASSES.last)
17-
.removeClass(CLASSES.lastCollapsable)
17+
.removeClass(CLASSES.lastCollapsible)
1818
.removeClass(CLASSES.lastExpandable)
1919
.find(">.hitarea")
20-
.removeClass(CLASSES.lastCollapsableHitarea)
20+
.removeClass(CLASSES.lastCollapsibleHitarea)
2121
.removeClass(CLASSES.lastExpandableHitarea);
2222
$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler"));
2323
}).bind("remove", function(event, branches) {
@@ -27,10 +27,10 @@
2727
prev.filter(":last-child").addClass(CLASSES.last)
2828
.filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end()
2929
.find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end()
30-
.filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end()
31-
.find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea);
30+
.filter("." + CLASSES.collapsible).replaceClass(CLASSES.last, CLASSES.lastCollapsible).end()
31+
.find(">.hitarea").replaceClass(CLASSES.collapsibleHitarea, CLASSES.lastCollapsibleHitarea);
3232
if (parent.is(":not(:has(>))") && parent[0] != this) {
33-
parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable)
33+
parent.parent().removeClass(CLASSES.collapsible).removeClass(CLASSES.expandable)
3434
parent.siblings(".hitarea").andSelf().remove();
3535
}
3636
});

0 commit comments

Comments
 (0)