summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2017-01-04 01:13:25 -0500
committerMichael Cahill <michael.cahill@mongodb.com>2017-01-04 17:13:25 +1100
commitb47f127c8d935e2a9815970eb1309d6e4b417549 (patch)
tree875faa88591757ac19357ddd46541039a9343415
parent49e48315235a189ed769c43e35e6a73b9a074fa2 (diff)
downloadmongo-b47f127c8d935e2a9815970eb1309d6e4b417549.tar.gz
WT-3099 lint: static function declarations, non-text characters in documentation (#3218)
* Remove characters outside the ISO/IEC 8859-1 character set in documentation. Add --encoding=iso-8859-1 to the aspell check line to avoid in the future. * __dump_txn_state and __dump_cache were prototyped static but not declared static. * Clang sanitizer complaint: ret set but never read because the error label sets ret explicitly.
-rwxr-xr-xdist/s_docs3
-rw-r--r--src/docs/spell.ok3
-rw-r--r--src/docs/tune-page-size-and-comp.dox8
-rw-r--r--src/evict/evict_lru.c10
-rw-r--r--src/utilities/util_dump.c16
5 files changed, 20 insertions, 20 deletions
diff --git a/dist/s_docs b/dist/s_docs
index f4332257193..6ebffb947ec 100755
--- a/dist/s_docs
+++ b/dist/s_docs
@@ -96,7 +96,8 @@ spellchk()
type aspell > /dev/null 2>&1 || return
(cd ../src/docs &&
- cat *.dox | aspell --lang=en --personal=./spell.ok list) |
+ cat *.dox |
+ aspell --encoding=iso-8859-1 --lang=en --personal=./spell.ok list) |
sort -u > $t
test -s $t && {
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
diff --git a/src/docs/spell.ok b/src/docs/spell.ok
index f87f24cef5c..bc2e16b1122 100644
--- a/src/docs/spell.ok
+++ b/src/docs/spell.ok
@@ -50,8 +50,8 @@ LDFLAGS
LIBS
LLVM
LOGREC
-LRVv
LRU
+LRVv
LSB
LSM
LZ
@@ -168,6 +168,7 @@ dNLen
dNOff
dT
dataN
+database's
dataitem
dataset
datasets
diff --git a/src/docs/tune-page-size-and-comp.dox b/src/docs/tune-page-size-and-comp.dox
index 70e9875bcc4..96b0fda2333 100644
--- a/src/docs/tune-page-size-and-comp.dox
+++ b/src/docs/tune-page-size-and-comp.dox
@@ -40,7 +40,7 @@ of these blocks is defined by a parameter called allocation_size, which is the
underlying unit of allocation for the file the data gets stored in. An
application might choose to have data compressed before it gets stored to disk
by enabling block compression.
- - A database’s tables are usually much larger than the main memory available.
+ - A database's tables are usually much larger than the main memory available.
Not all of the data can be kept in memory at any given time. A process called
eviction takes care of making space for new data by freeing the memory of data
infrequently accessed. An eviction server regularly finds in-memory pages that
@@ -52,7 +52,7 @@ associated key is used to refer to an in-memory page. In the case of this page
not being in memory, appropriate on-disk page(s) are read and an in-memory page
constructed (the opposite of reconciliation). A data structure is maintained on
every in-memory page to store any insertions or modifications to the data done
-on that page. As more and more data gets written to this page, the page’s memory
+on that page. As more and more data gets written to this page, the page's memory
footprint keeps growing.
- An application can choose to set the maximum size a page is allowed to grow
in-memory. A default size is set by WiredTiger if the application doesn't
@@ -81,7 +81,7 @@ There are additional configuration settings that tune more esoteric and
specialized data. Those are included for completeness but are rarely changed.
@subsection memory_page_max memory_page_max
-The maximum size a table’s page is allowed to grow to in memory before being
+The maximum size a table's page is allowed to grow to in memory before being
reconciled to disk.
- An integer, with acceptable values between 512B and 10TB
- Default size: 5 MB
@@ -98,7 +98,7 @@ both require exclusive access to the page which makes an application's write
operations wait. Having a large memory_page_max means that the pages will need
to be split and reconciled less often. But when that happens, the duration that
an exclusive access to the page is required is longer, increasing the latency of
-an application’s insert or update operations. Conversely, having a smaller
+an application's insert or update operations. Conversely, having a smaller
memory_page_max reduces the time taken for splitting and reconciling the pages,
but causes it to happen more frequently, forcing more frequent but shorter
exclusive accesses to the pages.
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 485fd0e6d40..a03c1f16dec 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -1619,7 +1619,7 @@ __evict_walk_file(WT_SESSION_IMPL *session,
if (page->read_gen == WT_READGEN_NOTSET)
__wt_cache_read_gen_new(session, page);
- /* Pages we no longer need (clean or dirty), are found money. */
+ /* Pages being forcibly evicted go on the urgent queue. */
if (page->read_gen == WT_READGEN_OLDEST ||
page->memory_footprint >= btree->splitmempage) {
WT_STAT_CONN_INCR(
@@ -1629,7 +1629,7 @@ __evict_walk_file(WT_SESSION_IMPL *session,
continue;
}
- /* Pages that are empty or from dead trees are also good. */
+ /* Pages that are empty or from dead trees are fast-tracked. */
if (__wt_page_is_empty(page) ||
F_ISSET(session->dhandle, WT_DHANDLE_DEAD))
goto fast;
@@ -2154,13 +2154,11 @@ __wt_evict_priority_clear(WT_SESSION_IMPL *session)
}
#ifdef HAVE_DIAGNOSTIC
-static int __dump_txn_state(WT_SESSION_IMPL *, FILE *fp);
-static int __dump_cache(WT_SESSION_IMPL *, FILE *fp);
/*
* __dump_txn_state --
* Output debugging information about the global transaction state.
*/
-int
+static int
__dump_txn_state(WT_SESSION_IMPL *session, FILE *fp)
{
WT_CONNECTION_IMPL *conn;
@@ -2259,7 +2257,7 @@ __dump_txn_state(WT_SESSION_IMPL *session, FILE *fp)
* __dump_cache --
* Output debugging information about the size of the files in cache.
*/
-int
+static int
__dump_cache(WT_SESSION_IMPL *session, FILE *fp)
{
WT_CONNECTION_IMPL *conn;
diff --git a/src/utilities/util_dump.c b/src/utilities/util_dump.c
index 95cd39322c4..3f8b4a49dfe 100644
--- a/src/utilities/util_dump.c
+++ b/src/utilities/util_dump.c
@@ -81,13 +81,13 @@ util_dump(WT_SESSION *session, int argc, char *argv[])
return (usage());
if (json &&
- ((ret = dump_json_begin(session)) != 0 ||
- (ret = dump_prefix(session, hex, json)) != 0))
+ (dump_json_begin(session) != 0 ||
+ dump_prefix(session, hex, json) != 0))
goto err;
for (i = 0; i < argc; i++) {
if (json && i > 0)
- if ((ret = dump_json_separator(session)) != 0)
+ if (dump_json_separator(session) != 0)
goto err;
free(name);
free(simplename);
@@ -120,7 +120,7 @@ util_dump(WT_SESSION *session, int argc, char *argv[])
}
if ((simplename = strdup(name)) == NULL) {
- ret = util_err(session, errno, NULL);
+ (void)util_err(session, errno, NULL);
goto err;
}
if ((p = strchr(simplename, '(')) != NULL)
@@ -128,19 +128,19 @@ util_dump(WT_SESSION *session, int argc, char *argv[])
if (dump_config(session, simplename, cursor, hex, json) != 0)
goto err;
- if ((ret = dump_record(cursor, reverse, json)) != 0)
+ if (dump_record(cursor, reverse, json) != 0)
goto err;
- if (json && (ret = dump_json_table_end(session)) != 0)
+ if (json && dump_json_table_end(session) != 0)
goto err;
ret = cursor->close(cursor);
cursor = NULL;
if (ret != 0) {
- ret = util_err(session, ret, NULL);
+ (void)util_err(session, ret, NULL);
goto err;
}
}
- if (json && ((ret = dump_json_end(session)) != 0))
+ if (json && dump_json_end(session) != 0)
goto err;
if (0) {