diff options
author | Luke Chen <luke.chen@mongodb.com> | 2018-12-17 15:19:04 +1100 |
---|---|---|
committer | Luke Chen <luke.chen@mongodb.com> | 2018-12-17 15:19:04 +1100 |
commit | 0a29c7a7c5737b0e6027cf4cb01828b1abd8f41c (patch) | |
tree | b81a77c211f7e41a58a9eeb5612c4e38a796e682 /src/third_party/wiredtiger/src/conn | |
parent | 53d8b294b81f70ec183f5d95be6440ecc5f8a728 (diff) | |
download | mongo-0a29c7a7c5737b0e6027cf4cb01828b1abd8f41c.tar.gz |
Import wiredtiger: d5793d4dd57bb763079e3f79821444e7e666ff44 from branch mongodb-4.2
ref: 5812c92f5f..d5793d4dd5
for: 4.1.7
WT-4280 Add debugging to know which session has a hazard pointer
WT-4430 Fix race between prepare and page instantiate with fast truncate
WT-4482 lint
Diffstat (limited to 'src/third_party/wiredtiger/src/conn')
-rw-r--r-- | src/third_party/wiredtiger/src/conn/api_calc_modify.c | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_api.c | 9 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_stat.c | 5 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/third_party/wiredtiger/src/conn/api_calc_modify.c b/src/third_party/wiredtiger/src/conn/api_calc_modify.c index 6de88644f79..a5a7fdff2b7 100644 --- a/src/third_party/wiredtiger/src/conn/api_calc_modify.c +++ b/src/third_party/wiredtiger/src/conn/api_calc_modify.c @@ -151,7 +151,7 @@ wiredtiger_calc_modify(WT_SESSION *wt_session, * in the post-image without finding a good match, double the size of * the gap, update the markers and keep trying. */ - h = hstart = hend = 0; + hstart = hend = 0; i = gap = 0; for (p1 = cms.used1, p2 = cms.used2, start = true; p1 + WT_CM_BLOCKSIZE <= cms.e1 && p2 + WT_CM_BLOCKSIZE <= cms.e2; diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c index 085100dc2b3..c01fd84b7d0 100644 --- a/src/third_party/wiredtiger/src/conn/conn_api.c +++ b/src/third_party/wiredtiger/src/conn/conn_api.c @@ -2613,10 +2613,11 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, } WT_ERR(__wt_config_gets(session, cfg, "buffer_alignment", &cval)); - if (cval.val == -1) - conn->buffer_alignment = - (conn->direct_io == 0) ? 0 : WT_BUFFER_ALIGNMENT_DEFAULT; - else + if (cval.val == -1) { + conn->buffer_alignment = 0; + if (conn->direct_io != 0) + conn->buffer_alignment = WT_BUFFER_ALIGNMENT_DEFAULT; + } else conn->buffer_alignment = (size_t)cval.val; #ifndef HAVE_POSIX_MEMALIGN if (conn->buffer_alignment != 0) diff --git a/src/third_party/wiredtiger/src/conn/conn_stat.c b/src/third_party/wiredtiger/src/conn/conn_stat.c index 741ea80f1cb..0e1ceae2fa0 100644 --- a/src/third_party/wiredtiger/src/conn/conn_stat.c +++ b/src/third_party/wiredtiger/src/conn/conn_stat.c @@ -613,6 +613,9 @@ __statlog_server(void *arg) session = arg; conn = S2C(session); + WT_CLEAR(path); + WT_CLEAR(tmp); + /* * We need a temporary place to build a path and an entry prefix. * The length of the path plus 128 should be more than enough. @@ -620,10 +623,8 @@ __statlog_server(void *arg) * We also need a place to store the current path, because that's * how we know when to close/re-open the file. */ - WT_CLEAR(path); WT_ERR(__wt_buf_init(session, &path, strlen(conn->stat_path) + 128)); WT_ERR(__wt_buf_setstr(session, &path, "")); - WT_CLEAR(tmp); WT_ERR(__wt_buf_init(session, &tmp, strlen(conn->stat_path) + 128)); WT_ERR(__wt_buf_setstr(session, &tmp, "")); |