summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-12-03 20:21:24 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-03 09:47:48 +0000
commit86f114d4842adb47d61b914ebf2afdefecaecc14 (patch)
treecd854fb438869a626c4fad097fecfa106616a91a
parenta33eb1f78d3cc0a9f637f7a88a6557dd8158f0e5 (diff)
downloadmongo-86f114d4842adb47d61b914ebf2afdefecaecc14.tar.gz
Import wiredtiger: b6bca85e6ea7902fa637cb82ec7cbacd90f3b76e from branch mongodb-master
ref: 2a3d709b3d..b6bca85e6e for: 5.2.0 WT-8485 Revert JSON messages for wt_progress
-rw-r--r--src/third_party/wiredtiger/dist/api_data.py4
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/block/block_ckpt_scan.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_slvg.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_upgrade.c2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_vrfy.c2
-rw-r--r--src/third_party/wiredtiger/src/config/config_def.c10
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c4
-rw-r--r--src/third_party/wiredtiger/src/include/connection.h1
-rw-r--r--src/third_party/wiredtiger/src/include/extern.h4
-rw-r--r--src/third_party/wiredtiger/src/include/verbose.h3
-rw-r--r--src/third_party/wiredtiger/src/include/wiredtiger.in5
-rw-r--r--src/third_party/wiredtiger/src/support/err.c29
13 files changed, 20 insertions, 50 deletions
diff --git a/src/third_party/wiredtiger/dist/api_data.py b/src/third_party/wiredtiger/dist/api_data.py
index e1addc922c7..f392cddaae7 100644
--- a/src/third_party/wiredtiger/dist/api_data.py
+++ b/src/third_party/wiredtiger/dist/api_data.py
@@ -760,9 +760,7 @@ connection_runtime_config = [
'error' represents the messages from the WT_EVENT_HANDLER::handle_error method.''',
type='list', choices=[
'error',
- 'message',
- 'progress'
- ]),
+ 'message']),
Config('lsm_manager', '', r'''
configure database wide options for LSM tree management. The LSM
manager is started automatically the first time an LSM tree is opened.
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index d5a781ac306..5f417fd193c 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": "2a3d709b3dd9b21636f0c95a88d2b283707a0d3e"
+ "commit": "b6bca85e6ea7902fa637cb82ec7cbacd90f3b76e"
}
diff --git a/src/third_party/wiredtiger/src/block/block_ckpt_scan.c b/src/third_party/wiredtiger/src/block/block_ckpt_scan.c
index 98c91c12c6b..8b2b4941158 100644
--- a/src/third_party/wiredtiger/src/block/block_ckpt_scan.c
+++ b/src/third_party/wiredtiger/src/block/block_ckpt_scan.c
@@ -264,7 +264,7 @@ __wt_block_checkpoint_last(WT_SESSION_IMPL *session, WT_BLOCK *block, char **met
/* Report progress occasionally. */
#define WT_CHECKPOINT_LIST_PROGRESS_INTERVAL 100
if (++nblocks % WT_CHECKPOINT_LIST_PROGRESS_INTERVAL == 0)
- WT_ERR(__wt_progress(session, WT_VERB_CHECKPOINT_PROGRESS, NULL, nblocks));
+ WT_ERR(__wt_progress(session, NULL, nblocks));
/*
* Read the start of a possible page and get a block length from it. Move to the next
diff --git a/src/third_party/wiredtiger/src/btree/bt_slvg.c b/src/third_party/wiredtiger/src/btree/bt_slvg.c
index 589a5503c19..531d8cb6317 100644
--- a/src/third_party/wiredtiger/src/btree/bt_slvg.c
+++ b/src/third_party/wiredtiger/src/btree/bt_slvg.c
@@ -445,7 +445,7 @@ __slvg_read(WT_SESSION_IMPL *session, WT_STUFF *ss)
/* Report progress occasionally. */
#define WT_SALVAGE_PROGRESS_INTERVAL 100
if (++ss->fcnt % WT_SALVAGE_PROGRESS_INTERVAL == 0)
- WT_ERR(__wt_progress(session, WT_VERB_SALVAGE_PROGRESS, NULL, ss->fcnt));
+ WT_ERR(__wt_progress(session, NULL, ss->fcnt));
/*
* Read (and potentially decompress) the block; the underlying block manager might return
diff --git a/src/third_party/wiredtiger/src/btree/bt_upgrade.c b/src/third_party/wiredtiger/src/btree/bt_upgrade.c
index d5c1fa24f14..de9a6bf7574 100644
--- a/src/third_party/wiredtiger/src/btree/bt_upgrade.c
+++ b/src/third_party/wiredtiger/src/btree/bt_upgrade.c
@@ -18,6 +18,6 @@ __wt_upgrade(WT_SESSION_IMPL *session, const char *cfg[])
WT_UNUSED(cfg);
/* There's nothing to upgrade, yet. */
- WT_RET(__wt_progress(session, WT_VERB_UPGRADE_PROGRESS, NULL, 1));
+ WT_RET(__wt_progress(session, NULL, 1));
return (0);
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_vrfy.c b/src/third_party/wiredtiger/src/btree/bt_vrfy.c
index 0cef98528cf..6e9ffcf73ee 100644
--- a/src/third_party/wiredtiger/src/btree/bt_vrfy.c
+++ b/src/third_party/wiredtiger/src/btree/bt_vrfy.c
@@ -454,7 +454,7 @@ __verify_tree(
* Report progress occasionally.
*/
if (++vs->fcnt % WT_VERIFY_PROGRESS_INTERVAL == 0)
- WT_RET(__wt_progress(session, WT_VERB_VERIFY_PROGRESS, NULL, vs->fcnt));
+ WT_RET(__wt_progress(session, NULL, vs->fcnt));
#ifdef HAVE_DIAGNOSTIC
/* Optionally dump the blocks or page in debugging mode. */
diff --git a/src/third_party/wiredtiger/src/config/config_def.c b/src/third_party/wiredtiger/src/config/config_def.c
index 406e56cd35c..edcbca78e8e 100644
--- a/src/third_party/wiredtiger/src/config/config_def.c
+++ b/src/third_party/wiredtiger/src/config/config_def.c
@@ -140,7 +140,7 @@ static const WT_CONFIG_CHECK confchk_WT_CONNECTION_reconfigure[] = {
{"file_manager", "category", NULL, NULL, confchk_wiredtiger_open_file_manager_subconfigs, 3},
{"history_store", "category", NULL, NULL, confchk_wiredtiger_open_history_store_subconfigs, 1},
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
- {"json_output", "list", NULL, "choices=[\"error\",\"message\",\"progress\"]", NULL, 0},
+ {"json_output", "list", NULL, "choices=[\"error\",\"message\"]", NULL, 0},
{"log", "category", NULL, NULL, confchk_WT_CONNECTION_reconfigure_log_subconfigs, 4},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
{"operation_timeout_ms", "int", NULL, "min=1", NULL, 0},
@@ -872,7 +872,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = {
{"history_store", "category", NULL, NULL, confchk_wiredtiger_open_history_store_subconfigs, 1},
{"in_memory", "boolean", NULL, NULL, NULL, 0},
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
- {"json_output", "list", NULL, "choices=[\"error\",\"message\",\"progress\"]", NULL, 0},
+ {"json_output", "list", NULL, "choices=[\"error\",\"message\"]", NULL, 0},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
{"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
@@ -955,7 +955,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = {
{"history_store", "category", NULL, NULL, confchk_wiredtiger_open_history_store_subconfigs, 1},
{"in_memory", "boolean", NULL, NULL, NULL, 0},
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
- {"json_output", "list", NULL, "choices=[\"error\",\"message\",\"progress\"]", NULL, 0},
+ {"json_output", "list", NULL, "choices=[\"error\",\"message\"]", NULL, 0},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
{"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
@@ -1035,7 +1035,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = {
{"hazard_max", "int", NULL, "min=15", NULL, 0},
{"history_store", "category", NULL, NULL, confchk_wiredtiger_open_history_store_subconfigs, 1},
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
- {"json_output", "list", NULL, "choices=[\"error\",\"message\",\"progress\"]", NULL, 0},
+ {"json_output", "list", NULL, "choices=[\"error\",\"message\"]", NULL, 0},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
{"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
@@ -1113,7 +1113,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = {
{"hazard_max", "int", NULL, "min=15", NULL, 0},
{"history_store", "category", NULL, NULL, confchk_wiredtiger_open_history_store_subconfigs, 1},
{"io_capacity", "category", NULL, NULL, confchk_wiredtiger_open_io_capacity_subconfigs, 1},
- {"json_output", "list", NULL, "choices=[\"error\",\"message\",\"progress\"]", NULL, 0},
+ {"json_output", "list", NULL, "choices=[\"error\",\"message\"]", NULL, 0},
{"log", "category", NULL, NULL, confchk_wiredtiger_open_log_subconfigs, 9},
{"lsm_manager", "category", NULL, NULL, confchk_wiredtiger_open_lsm_manager_subconfigs, 2},
{"mmap", "boolean", NULL, NULL, NULL, 0}, {"mmap_all", "boolean", NULL, NULL, NULL, 0},
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 4ada55ec9b4..2735037ee29 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -2007,8 +2007,8 @@ __wt_verbose_config(WT_SESSION_IMPL *session, const char *cfg[])
{"thread_group", WT_VERB_THREAD_GROUP}, {"timestamp", WT_VERB_TIMESTAMP},
{"tiered", WT_VERB_TIERED}, {"transaction", WT_VERB_TRANSACTION}, {"verify", WT_VERB_VERIFY},
{"version", WT_VERB_VERSION}, {"write", WT_VERB_WRITE}, {NULL, 0}};
- static const WT_NAME_FLAG jsontypes[] = {{"error", WT_JSON_OUTPUT_ERROR},
- {"message", WT_JSON_OUTPUT_MESSAGE}, {"progress", WT_JSON_OUTPUT_PROGRESS}, {NULL, 0}};
+ static const WT_NAME_FLAG jsontypes[] = {
+ {"error", WT_JSON_OUTPUT_ERROR}, {"message", WT_JSON_OUTPUT_MESSAGE}, {NULL, 0}};
WT_CONFIG_ITEM cval, sval;
WT_CONNECTION_IMPL *conn;
diff --git a/src/third_party/wiredtiger/src/include/connection.h b/src/third_party/wiredtiger/src/include/connection.h
index 2944801b8ad..14f21759640 100644
--- a/src/third_party/wiredtiger/src/include/connection.h
+++ b/src/third_party/wiredtiger/src/include/connection.h
@@ -560,7 +560,6 @@ struct __wt_connection_impl {
/* AUTOMATIC FLAG VALUE GENERATION START 0 */
#define WT_JSON_OUTPUT_ERROR 0x1u
#define WT_JSON_OUTPUT_MESSAGE 0x2u
-#define WT_JSON_OUTPUT_PROGRESS 0x4u
/* AUTOMATIC FLAG VALUE GENERATION STOP 8 */
uint8_t json_output; /* Output event handler messages in JSON format */
diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h
index 0316683c6f6..1acc30a0edd 100644
--- a/src/third_party/wiredtiger/src/include/extern.h
+++ b/src/third_party/wiredtiger/src/include/extern.h
@@ -1215,8 +1215,8 @@ extern int __wt_panic_func(WT_SESSION_IMPL *session, int error, const char *func
WT_GCC_FUNC_DECL_ATTRIBUTE((format(printf, 6, 7)))
WT_GCC_FUNC_DECL_ATTRIBUTE((visibility("default")))
WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
-extern int __wt_progress(WT_SESSION_IMPL *session, WT_VERBOSE_CATEGORY category, const char *s,
- uint64_t v) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
+extern int __wt_progress(WT_SESSION_IMPL *session, const char *s, uint64_t v)
+ WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_random_descent(WT_SESSION_IMPL *session, WT_REF **refp, uint32_t flags)
WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result));
extern int __wt_range_truncate(WT_CURSOR *start, WT_CURSOR *stop)
diff --git a/src/third_party/wiredtiger/src/include/verbose.h b/src/third_party/wiredtiger/src/include/verbose.h
index b170108440e..96f2995ca23 100644
--- a/src/third_party/wiredtiger/src/include/verbose.h
+++ b/src/third_party/wiredtiger/src/include/verbose.h
@@ -45,7 +45,6 @@
gen(WT_VERB_RECOVERY_PROGRESS) \
gen(WT_VERB_RTS) \
gen(WT_VERB_SALVAGE) \
- gen(WT_VERB_SALVAGE_PROGRESS) \
gen(WT_VERB_SHARED_CACHE) \
gen(WT_VERB_SPLIT) \
gen(WT_VERB_TEMPORARY) \
@@ -53,9 +52,7 @@
gen(WT_VERB_TIERED) \
gen(WT_VERB_TIMESTAMP) \
gen(WT_VERB_TRANSACTION) \
- gen(WT_VERB_UPGRADE_PROGRESS) \
gen(WT_VERB_VERIFY) \
- gen(WT_VERB_VERIFY_PROGRESS) \
gen(WT_VERB_VERSION) \
gen(WT_VERB_WRITE)
/* clang-format on */
diff --git a/src/third_party/wiredtiger/src/include/wiredtiger.in b/src/third_party/wiredtiger/src/include/wiredtiger.in
index 76f433a705d..a287adab911 100644
--- a/src/third_party/wiredtiger/src/include/wiredtiger.in
+++ b/src/third_party/wiredtiger/src/include/wiredtiger.in
@@ -2204,8 +2204,7 @@ struct __wt_connection {
* @config{json_output, enable JSON formatted messages on the event handler interface.
* Options are given as a list\, where each option specifies an event handler category e.g.
* 'error' represents the messages from the WT_EVENT_HANDLER::handle_error method., a list\,
- * with values chosen from the following options: \c "error"\, \c "message"\, \c "progress";
- * default \c [].}
+ * with values chosen from the following options: \c "error"\, \c "message"; default \c [].}
* @config{log = (, enable logging. Enabling logging uses three sessions from the
* configured session_max., a set of related configuration options defined below.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;archive, automatically archive unneeded log files., a
@@ -2985,7 +2984,7 @@ struct __wt_connection {
* @config{json_output, enable JSON formatted messages on the event handler interface. Options are
* given as a list\, where each option specifies an event handler category e.g. 'error' represents
* the messages from the WT_EVENT_HANDLER::handle_error method., a list\, with values chosen from
- * the following options: \c "error"\, \c "message"\, \c "progress"; default \c [].}
+ * the following options: \c "error"\, \c "message"; default \c [].}
* @config{log = (, enable logging. Enabling logging uses three sessions from the configured
* session_max., a set of related configuration options defined below.}
* @config{&nbsp;&nbsp;&nbsp;&nbsp;archive, automatically archive unneeded log files., a boolean
diff --git a/src/third_party/wiredtiger/src/support/err.c b/src/third_party/wiredtiger/src/support/err.c
index ad1cb17562b..3edcdb51f81 100644
--- a/src/third_party/wiredtiger/src/support/err.c
+++ b/src/third_party/wiredtiger/src/support/err.c
@@ -658,41 +658,18 @@ __wt_ext_strerror(WT_EXTENSION_API *wt_api, WT_SESSION *wt_session, int error)
* Progress message.
*/
int
-__wt_progress(WT_SESSION_IMPL *session, WT_VERBOSE_CATEGORY category, const char *s, uint64_t v)
+__wt_progress(WT_SESSION_IMPL *session, const char *s, uint64_t v)
{
WT_DECL_RET;
WT_EVENT_HANDLER *handler;
WT_SESSION *wt_session;
- size_t remain;
- char operation[1024];
- const char *msg;
- bool is_json;
wt_session = (WT_SESSION *)session;
-
handler = session->event_handler;
- is_json = FLD_ISSET(S2C(session)->json_output, WT_JSON_OUTPUT_PROGRESS);
- msg = s == NULL ? session->name : s;
- remain = sizeof(operation);
-
- /* Generate message. */
- WT_RET(__eventv_gen_msg(
- session, operation, &remain, is_json, 0, NULL, 0, category, WT_VERBOSE_NOTICE, msg));
-
- /* Write message. */
if (handler != NULL && handler->handle_progress != NULL)
- if ((ret = handler->handle_progress(handler, wt_session, operation, v)) != 0)
+ if ((ret = handler->handle_progress(
+ handler, wt_session, s == NULL ? session->name : s, v)) != 0)
__handler_failure(session, ret, "progress", false);
-
- /*
- * The buffer is fixed sized, complain if we overflow. (The test is for no more bytes remaining
- * in the buffer, so technically we might have filled it exactly.) Be cautious changing this
- * code, it's a recursive call.
- */
- if (ret == 0 && remain == 0)
- __wt_err(
- session, ENOMEM, "error or message truncated: internal WiredTiger buffer too small");
-
return (0);
}