summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Petrel <etienne.petrel@mongodb.com>2022-05-02 22:57:03 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-03 00:19:52 +0000
commitf8449cbc31ff0ea1f90a661ff30b12ac5e476028 (patch)
treeec0704ab9052496b0b9ba3d32c694bf7c4697647
parent6d83b2ad6f6edda80c56cbc99d00871649ffeac9 (diff)
downloadmongo-f8449cbc31ff0ea1f90a661ff30b12ac5e476028.tar.gz
Import wiredtiger: 4932879a4adae4922601eb3a445b465d2c3829e3 from branch mongodb-master
ref: cd6bab4314..4932879a4a for: 6.1.0-rc0 WT-8929 Improve s_style to find all paired typos
-rwxr-xr-xsrc/third_party/wiredtiger/bench/workgen/runner/runner/core.py2
-rwxr-xr-xsrc/third_party/wiredtiger/dist/s_style13
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_slvg.c2
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_dhandle.c2
-rw-r--r--src/third_party/wiredtiger/src/docs/database-config.dox2
-rw-r--r--src/third_party/wiredtiger/src/docs/tune-page-size-and-comp.dox2
-rw-r--r--src/third_party/wiredtiger/src/docs/upgrade.dox2
-rw-r--r--src/third_party/wiredtiger/src/evict/evict_lru.c6
-rw-r--r--src/third_party/wiredtiger/src/include/log.h2
-rw-r--r--src/third_party/wiredtiger/src/include/reconcile.h6
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_cursor.c6
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_manager.c8
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_col.c11
-rw-r--r--src/third_party/wiredtiger/src/support/modify.c2
-rw-r--r--src/third_party/wiredtiger/test/format/compact.c4
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_cursor07.py2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_cursor08.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_hs21.py2
-rwxr-xr-xsrc/third_party/wiredtiger/test/suite/test_metadata_cursor01.py2
-rw-r--r--src/third_party/wiredtiger/test/suite/test_timestamp02.py2
21 files changed, 45 insertions, 37 deletions
diff --git a/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py b/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py
index a7907e90f81..beb7b3c567d 100755
--- a/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py
+++ b/src/third_party/wiredtiger/bench/workgen/runner/runner/core.py
@@ -59,7 +59,7 @@ def timed(seconds, op):
# Check for a local build that contains the wt utility. First check for a
# user supplied 'WT_BUILDDIR' environment variable, then the current working
-# directory, then finally in in the disttop directory. This isn't
+# directory, then finally in the disttop directory. This isn't
# ideal - if a user has multiple builds in a tree we could pick the wrong one.
def _wiredtiger_builddir():
env_builddir = os.getenv('WT_BUILDDIR')
diff --git a/src/third_party/wiredtiger/dist/s_style b/src/third_party/wiredtiger/dist/s_style
index c24a569e3c1..eb9f2919ce5 100755
--- a/src/third_party/wiredtiger/dist/s_style
+++ b/src/third_party/wiredtiger/dist/s_style
@@ -20,7 +20,7 @@ if [ $# -ne 1 ]; then
-name '*.[chsy]' -o -name '*.in' -o -name '*.dox' -o -name '*.cxx' -o -name '*.cpp' -o -name '*.py' -o -name '*.cmake' -o -name '*.i' |
sed -e '/Makefile.in/d' \
-e '/test\/3rdparty/d' \
- -e '/checksum\/power8/d' \
+ -e '/test\/checksum\/power8/d' \
-e '/checksum\/zseries/d' |
xargs $xp -n 1 -I{} sh ./dist/s_style {}
else
@@ -57,10 +57,19 @@ else
cmp $t $f > /dev/null 2>&1 || (echo "modifying $f" && cp $t $f)
- egrep -w 'a a|an an|and and|are are|be be|by by|for for|from from|if if|in in[[:space:]]|is is|it it|of of|the the|this this|to to|was was|were were|when when|with with|a an|an a|a the|the a' $f > $t
+ # Finding paired typos in the comments of different file types and excluding invalid edge cases.
+ if [ "${fname##*.}" = "py" ]; then
+ egrep '#.*\b([a-zA-Z]+)\s\1\b' $f | egrep -v -e "in-memory" -e "one-file" > $t
+ elif [ "${fname##*.}" = "c" ] || [ "${fname##*.}" = "h" ]; then
+ egrep '/?*.*\b([a-zA-Z]+)\s\1\b' $f | egrep -v -e "@" -e "long long"> $t
+ else
+ egrep '\b([a-zA-Z]+)\s\1\b' $f | egrep -v -e "@" -e "^\(" -e "long long" -e "::" -e "[^.]" > $t
+ fi
+
test -s $t && {
echo "paired typo"
echo "============================"
+ echo $f
cat $t
}
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 580612050ba..c4e52abfc18 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "cd6bab431480d4b99cdaad08b0b750502721bd90"
+ "commit": "4932879a4adae4922601eb3a445b465d2c3829e3"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_slvg.c b/src/third_party/wiredtiger/src/btree/bt_slvg.c
index 644ac67aa4d..b5704e7049d 100644
--- a/src/third_party/wiredtiger/src/btree/bt_slvg.c
+++ b/src/third_party/wiredtiger/src/btree/bt_slvg.c
@@ -1674,7 +1674,7 @@ delete_b:
++ss->pages_next;
/*
- * Third, set its its stop key to be the stop key of the original chunk, and call
+ * Third, set its stop key to be the stop key of the original chunk, and call
* __slvg_row_trk_update_start. That function will both set the start key to be the first key
* after the stop key of the middle chunk (that's b_trk), and re-sort the WT_TRACK array as
* necessary to move our new entry into the right sorted location.
diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c
index 4a7fe673f11..86c36a82bb0 100644
--- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c
+++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c
@@ -787,7 +787,7 @@ __conn_dhandle_close_one(
/*
* __wt_conn_dhandle_close_all --
- * Close all data handles handles with matching name (including all checkpoint handles).
+ * Close all data handles with matching name (including all checkpoint handles).
*/
int
__wt_conn_dhandle_close_all(WT_SESSION_IMPL *session, const char *uri, bool removed, bool mark_dead)
diff --git a/src/third_party/wiredtiger/src/docs/database-config.dox b/src/third_party/wiredtiger/src/docs/database-config.dox
index b8dee0be980..5a4fedb2fb3 100644
--- a/src/third_party/wiredtiger/src/docs/database-config.dox
+++ b/src/third_party/wiredtiger/src/docs/database-config.dox
@@ -77,7 +77,7 @@ will be saved to the base configuration file so it's easier to write
general-purpose applications that might not be aware of how a particular
database was created and configured.
-Users should not not edit this file, set the \c WIREDTIGER_CONFIG
+Users should not edit this file, set the \c WIREDTIGER_CONFIG
environment variable or create a \c WiredTiger.config file instead, as
those settings override the settings in the base configuration file.
diff --git a/src/third_party/wiredtiger/src/docs/tune-page-size-and-comp.dox b/src/third_party/wiredtiger/src/docs/tune-page-size-and-comp.dox
index 6246036a32e..d1fcce028c7 100644
--- a/src/third_party/wiredtiger/src/docs/tune-page-size-and-comp.dox
+++ b/src/third_party/wiredtiger/src/docs/tune-page-size-and-comp.dox
@@ -345,7 +345,7 @@ Reduces the size requirement by storing any identical value only once per page.
\n\n
Dictionary configuration:
\n
-Specified using the \c dictionary configuration configuration option to
+Specified using the \c dictionary configuration option to
WT_SESSION::create, which specifies the maximum number of unique values
remembered in the B-Tree row-store leaf page value dictionary. An example of
such a configuration string is as follows:
diff --git a/src/third_party/wiredtiger/src/docs/upgrade.dox b/src/third_party/wiredtiger/src/docs/upgrade.dox
index 9f8331c9b1f..fd19c842900 100644
--- a/src/third_party/wiredtiger/src/docs/upgrade.dox
+++ b/src/third_party/wiredtiger/src/docs/upgrade.dox
@@ -74,7 +74,7 @@ compatible with earlier binaries.
<br><br>
- Applications concerned with downgrading should configure the
::wiredtiger_open \c config_base value to \c false, so WiredTiger does
-not write the base configuration file file when creating databases.
+not write the base configuration file when creating databases.
Because the base configuration file is written using a current version
of the WiredTiger API, writing this file could cause applications using
previous versions of the WiredTiger API to fail. See @ref config_base
diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c
index bab17cb9771..fd76f2b5aa1 100644
--- a/src/third_party/wiredtiger/src/evict/evict_lru.c
+++ b/src/third_party/wiredtiger/src/evict/evict_lru.c
@@ -281,9 +281,9 @@ __wt_evict_thread_run(WT_SESSION_IMPL *session, WT_THREAD *thread)
F_SET(session, WT_SESSION_EVICTION);
/*
- * Cache a history store cursor to avoid deadlock: if an eviction thread thread marks a file
- * busy and then opens a different file (in this case, the HS file), it can deadlock with a
- * thread waiting for the first file to drain from the eviction queue. See WT-5946 for details.
+ * Cache a history store cursor to avoid deadlock: if an eviction thread marks a file busy and
+ * then opens a different file (in this case, the HS file), it can deadlock with a thread
+ * waiting for the first file to drain from the eviction queue. See WT-5946 for details.
*/
WT_ERR(__wt_curhs_cache(session));
if (conn->evict_server_running && __wt_spin_trylock(session, &cache->evict_pass_lock) == 0) {
diff --git a/src/third_party/wiredtiger/src/include/log.h b/src/third_party/wiredtiger/src/include/log.h
index c8482f1febb..ae52cb94ebc 100644
--- a/src/third_party/wiredtiger/src/include/log.h
+++ b/src/third_party/wiredtiger/src/include/log.h
@@ -283,7 +283,7 @@ struct __wt_log {
/*
* Consolidation array information Our testing shows that the more consolidation we generate the
- * better the performance we see which equates to an active slot slot count of one.
+ * better the performance we see which equates to an active slot count of one.
*
* Note: this can't be an array, we impose cache-line alignment and gcc doesn't support that for
* arrays.
diff --git a/src/third_party/wiredtiger/src/include/reconcile.h b/src/third_party/wiredtiger/src/include/reconcile.h
index 3b5e9e427ac..c8ba7ad3dfa 100644
--- a/src/third_party/wiredtiger/src/include/reconcile.h
+++ b/src/third_party/wiredtiger/src/include/reconcile.h
@@ -116,9 +116,9 @@ struct __wt_reconcile {
* can delete the leaf page without reading it because we don't have to discard any overflow
* items it might reference.
*
- * The test test is per-page reconciliation, that is, once we see an overflow item on the page,
- * all subsequent leaf pages written for the page will not be leaf-no-overflow type, regardless
- * of whether or not they contain overflow items. In other words, leaf-no-overflow is not
+ * The test is per-page reconciliation, that is, once we see an overflow item on the page, all
+ * subsequent leaf pages written for the page will not be leaf-no-overflow type, regardless of
+ * whether or not they contain overflow items. In other words, leaf-no-overflow is not
* guaranteed to be set on every page that doesn't contain an overflow item, only that if it is
* set, the page contains no overflow items. XXX This was originally done because raw
* compression couldn't do better, now that raw compression has been removed, we should do
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_cursor.c b/src/third_party/wiredtiger/src/lsm/lsm_cursor.c
index b28977bc0d0..d8354ce7686 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_cursor.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_cursor.c
@@ -1574,9 +1574,9 @@ __clsm_remove(WT_CURSOR *cursor)
WT_ERR(__clsm_put(session, clsm, &cursor->key, &__tombstone, true, false));
/*
- * If the cursor was positioned, it stays positioned with a key but no no value, otherwise,
- * there's no position, key or value. This isn't just cosmetic, without a reset, iteration on
- * this cursor won't start at the beginning/end of the table.
+ * If the cursor was positioned, it stays positioned with a key but no value, otherwise, there's
+ * no position, key or value. This isn't just cosmetic, without a reset, iteration on this
+ * cursor won't start at the beginning/end of the table.
*/
F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET);
if (positioned)
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_manager.c b/src/third_party/wiredtiger/src/lsm/lsm_manager.c
index 4dfcaa65902..6ef59a46a94 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_manager.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_manager.c
@@ -67,10 +67,10 @@ __lsm_general_worker_start(WT_SESSION_IMPL *session)
else {
worker_args->type = WT_LSM_WORK_GENERAL_OPS;
/*
- * Only allow half of the threads to run merges to avoid all all workers getting stuck
- * in long-running merge operations. Make sure the first worker is allowed, so that
- * there is at least one thread capable of running merges. We know the first worker is
- * id 2, so set merges on even numbered workers.
+ * Only allow half of the threads to run merges to avoid all workers getting stuck in
+ * long-running merge operations. Make sure the first worker is allowed, so that there
+ * is at least one thread capable of running merges. We know the first worker is id 2,
+ * so set merges on even numbered workers.
*/
if (manager->lsm_workers % 2 == 0)
FLD_SET(worker_args->type, WT_LSM_WORK_MERGE);
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_col.c b/src/third_party/wiredtiger/src/reconcile/rec_col.c
index 489ae9e0677..c9af79b4d86 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_col.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_col.c
@@ -706,8 +706,8 @@ __wt_rec_col_fix(
* do that explicitly because we need to act on it. So there are three cases: (a) the
* value has a globally visible stop time, in which case we should delete the value and
* drop the time window; (b) the time window may have changed but remains nonempty, in
- * which case we leave the value and write write the time window to the new page; or (c)
- * the time window has become empty, in which case we leave the value and drop the time
+ * which case we leave the value and write the time window to the new page; or (c) the
+ * time window has become empty, in which case we leave the value and drop the time
* window, which amounts to doing nothing at all.
*/
@@ -828,10 +828,9 @@ __wt_rec_col_fix(
}
/*
- * Figure out how much more space is left. This is how many more entries will fit in in the
- * bitmap data. We have to accommodate the auxiliary data for those entries, even if it becomes
- * large. We can't split based on the auxiliary image size, at least not without a major
- * rewrite.
+ * Figure out how much more space is left. This is how many more entries will fit in the bitmap
+ * data. We have to accommodate the auxiliary data for those entries, even if it becomes large.
+ * We can't split based on the auxiliary image size, at least not without a major rewrite.
*/
nrecs = maxrecs - entry;
r->recno += entry;
diff --git a/src/third_party/wiredtiger/src/support/modify.c b/src/third_party/wiredtiger/src/support/modify.c
index 390e7d2acd7..977744acb9e 100644
--- a/src/third_party/wiredtiger/src/support/modify.c
+++ b/src/third_party/wiredtiger/src/support/modify.c
@@ -246,7 +246,7 @@ __modify_fast_path(WT_ITEM *value, const size_t *p, int nentries, int *nappliedp
/*
* If the modifications are sorted and don't overlap in the old or new values, we can do a fast
- * application of all the modifications modifications in a single pass.
+ * application of all the modifications in a single pass.
*
* The requirement for ordering is unfortunate, but modifications are performed in order, and
* applications specify byte offsets based on that. In other words, byte offsets are cumulative,
diff --git a/src/third_party/wiredtiger/test/format/compact.c b/src/third_party/wiredtiger/test/format/compact.c
index a44523a6fa6..c7b43d8a4b9 100644
--- a/src/third_party/wiredtiger/test/format/compact.c
+++ b/src/third_party/wiredtiger/test/format/compact.c
@@ -64,8 +64,8 @@ compact(void *arg)
* Compact can return EBUSY if concurrent with alter or if there is eviction pressure, or we
* collide with checkpoints.
*
- * Compact returns ETIMEDOUT if the compaction doesn't finish in in some number of seconds.
- * We don't configure a timeout and occasionally exceed the default of 1200 seconds.
+ * Compact returns ETIMEDOUT if the compaction doesn't finish in some number of seconds. We
+ * don't configure a timeout and occasionally exceed the default of 1200 seconds.
*/
table = table_select(NULL);
ret = session->compact(session, table->uri, NULL);
diff --git a/src/third_party/wiredtiger/test/suite/test_cursor07.py b/src/third_party/wiredtiger/test/suite/test_cursor07.py
index 58bc1b87223..023c500f9fe 100755
--- a/src/third_party/wiredtiger/test/suite/test_cursor07.py
+++ b/src/third_party/wiredtiger/test/suite/test_cursor07.py
@@ -98,7 +98,7 @@ class test_cursor07(wttest.WiredTigerTestCase, suite_subprocess):
keys = c.get_key()
# txnid, rectype, optype, fileid, logrec_key, logrec_value
values = c.get_value()
- # We are only looking for log records that that have a key/value
+ # We are only looking for log records that have a key/value
# pair.
if values[4] != b'':
if value in values[5]: # logrec_value
diff --git a/src/third_party/wiredtiger/test/suite/test_cursor08.py b/src/third_party/wiredtiger/test/suite/test_cursor08.py
index 6b46038083e..7b535ddf295 100755
--- a/src/third_party/wiredtiger/test/suite/test_cursor08.py
+++ b/src/third_party/wiredtiger/test/suite/test_cursor08.py
@@ -87,7 +87,7 @@ class test_cursor08(wttest.WiredTigerTestCase, suite_subprocess):
keys = c.get_key()
# txnid, rectype, optype, fileid, logrec_key, logrec_value
values = c.get_value()
- # We are only looking for log records that that have a key/value
+ # We are only looking for log records that have a key/value
# pair.
if values[4] != b'':
if value.encode() in values[5]: # logrec_value
diff --git a/src/third_party/wiredtiger/test/suite/test_hs21.py b/src/third_party/wiredtiger/test/suite/test_hs21.py
index 6f1c384c868..638823d87d0 100644
--- a/src/third_party/wiredtiger/test/suite/test_hs21.py
+++ b/src/third_party/wiredtiger/test/suite/test_hs21.py
@@ -145,7 +145,7 @@ class test_hs21(wttest.WiredTigerTestCase):
# Check that all updates at timestamp 2 are seen.
self.check(session_read, value1, ds.uri, self.nrows // 2)
- # Perform a series of updates over over files at a later timestamp. Checking the history store data is consistent
+ # Perform a series of updates over files at a later timestamp. Checking the history store data is consistent
# with old and new timestamps.
for (_, ds) in active_files:
# Load more data with a later timestamp.
diff --git a/src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py b/src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py
index 423d93e7a2a..35f482a6611 100755
--- a/src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py
+++ b/src/third_party/wiredtiger/test/suite/test_metadata_cursor01.py
@@ -124,7 +124,7 @@ class test_metadata_cursor01(wttest.WiredTigerTestCase):
cursor = self.session.open_cursor(self.metauri, None, None)
self.assertCursorHasNoKeyValue(cursor)
- # Ensure the 'special' metadata metadata is found.
+ # Ensure the 'special' metadata is found.
value = cursor['metadata:']
self.assertTrue(value.find('key_format') != -1)
diff --git a/src/third_party/wiredtiger/test/suite/test_timestamp02.py b/src/third_party/wiredtiger/test/suite/test_timestamp02.py
index 5982db45abe..2164c247af6 100644
--- a/src/third_party/wiredtiger/test/suite/test_timestamp02.py
+++ b/src/third_party/wiredtiger/test/suite/test_timestamp02.py
@@ -135,7 +135,7 @@ class test_timestamp02(wttest.WiredTigerTestCase, suite_subprocess):
# - If both the oldest and the stable are provided in the same call, the test to check if
# they are being moved backwards is done first. The value that is being set backwards is
# silently dropped, as if not provided at all. This is followed by the test on the oldest
- # not being being set ahead of the stable.
+ # not being set ahead of the stable.
# Confirm that the oldest and the stable timestamps are as expected
self.assertTimestampsEqual(\