diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-07-30 16:19:19 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-07-30 16:19:19 +1000 |
commit | 9ca6c110827ffb212613d4e6c5f9645a41c0432d (patch) | |
tree | 842e8c8aa6c8222ef658501044b40580ec15b1d0 /src/third_party/wiredtiger/src/meta | |
parent | 44c522677421537b3cf118d323af82353ad956d4 (diff) | |
download | mongo-9ca6c110827ffb212613d4e6c5f9645a41c0432d.tar.gz |
Import wiredtiger: 376f355fb03c770b4fc7374ef817c0c786311e7a from branch mongodb-4.2
ref: 1be1b793be..376f355fb0
for: 4.1.2
WT-3963 Add a schema intensive abort testing
WT-4147 Log recovery should not ignore corruption outside of log records in a log file
WT-4183 Extend verbose option to log more messages on error returns
WT-4186 Log recovery should detect and report corruption within log records
WT-4187 Coverity: unused value complaints
WT-4189 Potential infinite loop in __async_flush_wait().
WT-4191 Fix Coverity static analysis errors
WT-4195 When encountering an illegal value, log the value that failed
WT-4196 Make log corruption checking work regardless of the machine byte order
WT-4198 Some supported MongoDB architectures don't support crc32 hardware
WT-4199 Fix an incorrect report of log corruption
Diffstat (limited to 'src/third_party/wiredtiger/src/meta')
-rw-r--r-- | src/third_party/wiredtiger/src/meta/meta_track.c | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/meta/meta_turtle.c | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/src/meta/meta_track.c b/src/third_party/wiredtiger/src/meta/meta_track.c index a8289b91ffa..6640af0491c 100644 --- a/src/third_party/wiredtiger/src/meta/meta_track.c +++ b/src/third_party/wiredtiger/src/meta/meta_track.c @@ -8,6 +8,7 @@ #include "wt_internal.h" +#undef WT_ENABLE_SCHEMA_TXN /* * WT_META_TRACK -- A tracked metadata operation: a non-transactional log, * maintained to make it easy to unroll simple metadata and filesystem @@ -118,6 +119,7 @@ __wt_meta_track_on(WT_SESSION_IMPL *session) if (!F_ISSET(&session->txn, WT_TXN_RUNNING)) { #ifdef WT_ENABLE_SCHEMA_TXN WT_RET(__wt_txn_begin(session, NULL)); + __wt_errx(session, "TRACK: Using internal schema txn"); #endif F_SET(session, WT_SESSION_SCHEMA_TXN); } @@ -279,6 +281,7 @@ __wt_meta_track_off(WT_SESSION_IMPL *session, bool need_sync, bool unroll) F_CLR(session, WT_SESSION_SCHEMA_TXN); #ifdef WT_ENABLE_SCHEMA_TXN WT_ERR(__wt_txn_commit(session, NULL)); + __wt_errx(session, "TRACK: Commit internal schema txn"); #endif } @@ -339,6 +342,7 @@ err: /* WT_ASSERT(session, unroll || saved_ret != 0 || session->txn.mod_count == 0); #ifdef WT_ENABLE_SCHEMA_TXN + __wt_errx(session, "TRACK: Abort internal schema txn"); WT_TRET(__wt_txn_rollback(session, NULL)); #endif } diff --git a/src/third_party/wiredtiger/src/meta/meta_turtle.c b/src/third_party/wiredtiger/src/meta/meta_turtle.c index 2c83167c28f..af5c753b70a 100644 --- a/src/third_party/wiredtiger/src/meta/meta_turtle.c +++ b/src/third_party/wiredtiger/src/meta/meta_turtle.c @@ -82,7 +82,8 @@ __metadata_load_hot_backup(WT_SESSION_IMPL *session) break; WT_ERR(__wt_getline(session, fs, value)); if (value->size == 0) - WT_ERR(__wt_illegal_value(session, WT_METADATA_BACKUP)); + WT_PANIC_ERR(session, EINVAL, + "%s: zero-length value", WT_METADATA_BACKUP); WT_ERR(__wt_metadata_update(session, key->data, value->data)); } @@ -329,8 +330,10 @@ err: WT_TRET(__wt_fclose(session, &fs)); * something has gone horribly wrong, except for the compatibility * setting which is optional. */ - return (ret == 0 || strcmp(key, WT_METADATA_COMPAT) == 0 ? ret : - __wt_illegal_value(session, WT_METADATA_TURTLE)); + if (ret == 0 || strcmp(key, WT_METADATA_COMPAT) == 0) + return (ret); + WT_PANIC_RET(session, ret, + "%s: fatal turtle file read error", WT_METADATA_TURTLE); } /* @@ -388,5 +391,8 @@ err: WT_TRET(__wt_fclose(session, &fs)); * An error updating the turtle file means something has gone horribly * wrong -- we're done. */ - return (ret == 0 ? 0 : __wt_illegal_value(session, WT_METADATA_TURTLE)); + if (ret == 0) + return (ret); + WT_PANIC_RET(session, ret, + "%s: fatal turtle file update error", WT_METADATA_TURTLE); } |