diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-05-04 13:57:22 +1000 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-05-04 13:57:22 +1000 |
commit | 11d837751b0da2cf7948ee17e2f6438f38c93693 (patch) | |
tree | 508b815763591b0d61f457b845a7d49909f1dd8d /src/third_party/wiredtiger/src/log/log.c | |
parent | 381acc4baa6d5f730fb77be5acc39f8473a16b88 (diff) | |
download | mongo-11d837751b0da2cf7948ee17e2f6438f38c93693.tar.gz |
Import wiredtiger: ba76f72622a52024382effb7296e9f8f5cac224b from branch mongodb-3.8
ref: aa6646fd0a..ba76f72622
for: 3.7.10
WT-4023 Add messages to a few places that return errors
WT-4033 Add ability to alter tables without taking exclusive access
WT-4058 Make slot switch quicker when I/O is slow
WT-4064 Relax checking of lookaside entry count
WT-4069 Commit of a truncate can leave a page permanently locked
WT-4070 WiredTiger recovery can checkpoint data referencing pieces of a transaction
Diffstat (limited to 'src/third_party/wiredtiger/src/log/log.c')
-rw-r--r-- | src/third_party/wiredtiger/src/log/log.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/src/log/log.c b/src/third_party/wiredtiger/src/log/log.c index 167297c5c80..87ed32d80de 100644 --- a/src/third_party/wiredtiger/src/log/log.c +++ b/src/third_party/wiredtiger/src/log/log.c @@ -521,7 +521,8 @@ __wt_log_extract_lognum( const char *p; if (id == NULL || name == NULL) - return (WT_ERROR); + WT_RET_MSG(session, EINVAL, + "%s: unexpected usage: no id or no name", __func__); if ((p = strrchr(name, '.')) == NULL || sscanf(++p, "%" SCNu32, id) != 1) WT_RET_MSG(session, WT_ERROR, "Bad log file name '%s'", name); @@ -706,8 +707,8 @@ __log_decompress(WT_SESSION_IMPL *session, WT_ITEM *in, WT_ITEM *out) compressor = conn->log_compressor; if (compressor == NULL || compressor->decompress == NULL) WT_RET_MSG(session, WT_ERROR, - "log_decompress: Compressed record with " - "no configured compressor"); + "%s: Compressed record with no configured compressor", + __func__); uncompressed_size = logrec->mem_len; WT_RET(__wt_buf_initsize(session, out, uncompressed_size)); memcpy(out->mem, in->mem, skip); @@ -723,7 +724,8 @@ __log_decompress(WT_SESSION_IMPL *session, WT_ITEM *in, WT_ITEM *out) * it's OK, otherwise it's really, really bad. */ if (result_len != uncompressed_size - WT_LOG_COMPRESS_SKIP) - return (WT_ERROR); + WT_RET_MSG(session, WT_ERROR, + "%s: decompression failed with incorrect size", __func__); return (0); } @@ -745,8 +747,8 @@ __log_decrypt(WT_SESSION_IMPL *session, WT_ITEM *in, WT_ITEM *out) (encryptor = kencryptor->encryptor) == NULL || encryptor->decrypt == NULL) WT_RET_MSG(session, WT_ERROR, - "log_decrypt: Encrypted record with " - "no configured decrypt method"); + "%s: Encrypted record with no configured decrypt method", + __func__); return (__wt_decrypt(session, encryptor, WT_LOG_ENCRYPT_SKIP, in, out)); } @@ -1950,7 +1952,8 @@ __wt_log_scan(WT_SESSION_IMPL *session, WT_LSN *lsnp, uint32_t flags, if (LF_ISSET(WT_LOGSCAN_FROM_CKP)) start_lsn = log->ckpt_lsn; else if (!LF_ISSET(WT_LOGSCAN_FIRST)) - return (WT_ERROR); /* Illegal usage */ + WT_RET_MSG(session, WT_ERROR, + "%s: WT_LOGSCAN_FIRST not set", __func__); } lastlog = log->fileid; } else { |