diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-07 07:20:49 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-06-07 07:20:49 +1000 |
commit | 60341ff5b540ed35c8378910d92fe6c128f398e6 (patch) | |
tree | 989cb325f5ea6e335fda4852ae6cfca6a13d3b11 /src/third_party/wiredtiger/src/async | |
parent | a85685ce5ed0e07107476e1f4098034452cf7d6a (diff) | |
download | mongo-60341ff5b540ed35c8378910d92fe6c128f398e6.tar.gz |
Import wiredtiger: 7aaeaaa054d1ac27a95c79984f7ca69ba739caae from branch mongodb-3.6
ref: 78109ca3fe..7aaeaaa054
for: 3.5.9
SERVER-28820 Recovery failed: WT_NOTFOUND: item not found
SERVER-28835 Fix a memory leak in WiredTiger on error when creating thread group
WT-2972 Add interface allowing partial updates to existing values
WT-3041 Failure of test_perf01 on PPC
WT-3063 Reserve records for read-modify-write
WT-3076 Add a general-purpose epoch manager
WT-3123 Thread group holding lock across thread join
WT-3142 Add a workload generator application
WT-3158 Fix structure layout on Windows.
WT-3160 Improve eviction of internal pages from idle trees
WT-3197 aarch64 CRC32C support fails to compile on non-linux ARM platforms
WT-3219 Make the clang-analyzer job fail when lint is introduced
WT-3222 Review and enhance log statistics
WT-3245 Avoid hangs on shutdown when a utility thread encounters an error
WT-3247 Test should exit instead of abort to avoid a core dump
WT-3248 Performance degradation in workload with large overflow items
WT-3253 txn07 test problem
WT-3258 Improve visibility into thread wait time due to pages exceeding memory_page_max
WT-3261 add a checkpoint epoch to avoid draining the eviction queue
WT-3262 Schema operations shouldn't wait for cache
WT-3263 Allow archive on restart/recovery if clean shutdown
WT-3264 Permanent change to disable logging should eventually remove all logs
WT-3265 Verify hits assertion in eviction when transiting handle to exclusive mode
WT-3266 Thread group deadlock
WT-3267 Upgrade copyright notices from 2016 to 2017.
WT-3268 Failure to close cursor can get wiredtiger stuck in a cursor-close loop
WT-3269 Miscellaneous cleanup changes
WT-3271 Eviction tuning stuck in a loop
WT-3275 stress test sanitizer failure
WT-3278 log the row-store cursor key instead of page key
WT-3281 stress test sanitizer failure
WT-3282 Stuck in conn cache pool destroy join
WT-3284 tree-walk restart bug
WT-3287 review WiredTiger internal panic checks
WT-3288 fix error codes for event_handler to be consistent in file operations
WT-3292 review/cleanup full-barrier calls in WiredTiger
WT-3293 Make internal symbols externally visible
WT-3296 LAS table fixes/improvements
WT-3297 support the gcc/clang -fvisibility=hidden flag
WT-3300 Coverity 1374542: Dereference after null check
WT-3302 Failure to create cache pool manager thread results in crash when destroying cache pool
WT-3303 Deadlock during first access to lookaside table
WT-3307 FI testing: segfault in python test test_bug013 when fault introduced reading turtle file
WT-3312 encryption btree configuration test
WT-3313 Replace calls to the deprecated LZ4_compress function
WT-3314 clarify error handling
WT-3327 Checkpoints can hang if time runs backward
WT-3331 Test format aborted due to time rollback
WT-3333 Make it possible to store 0 bytes into a 'u' format via Python
WT-3334 static test suite's BaseDataSet class has 'u' value format bugs
WT-3339 The CURSOR_UPDATE_API_CALL macro will dump core on a NULL btree handle
WT-3342 Create a new WiredTiger 2.9.2 release
WT-3343 WiredTiger database close can attempt unlock of a lock that's not held.
WT-3345 Improve rwlock scaling
WT-3348 Lint, Windows warnings.
WT-3351 Recovery assertion failure: old_lognum < lognum
WT-3354 Coverity issues 1375904-1375907
WT-3356 rwlock assertion failure on PPC
Diffstat (limited to 'src/third_party/wiredtiger/src/async')
-rw-r--r-- | src/third_party/wiredtiger/src/async/async_api.c | 23 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/async/async_op.c | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/async/async_worker.c | 16 |
3 files changed, 15 insertions, 26 deletions
diff --git a/src/third_party/wiredtiger/src/async/async_api.c b/src/third_party/wiredtiger/src/async/async_api.c index b9cc995f5a5..0f3e376fbfd 100644 --- a/src/third_party/wiredtiger/src/async/async_api.c +++ b/src/third_party/wiredtiger/src/async/async_api.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014-2016 MongoDB, Inc. + * Copyright (c) 2014-2017 MongoDB, Inc. * Copyright (c) 2008-2014 WiredTiger, Inc. * All rights reserved. * @@ -395,13 +395,12 @@ __wt_async_reconfig(WT_SESSION_IMPL *session, const char *cfg[]) * Join any worker we're stopping. * After the thread is stopped, close its session. */ - WT_ASSERT(session, async->worker_tids[i] != 0); + WT_ASSERT(session, async->worker_tids[i].created); WT_ASSERT(session, async->worker_sessions[i] != NULL); F_CLR(async->worker_sessions[i], WT_SESSION_SERVER_ASYNC); WT_TRET(__wt_thread_join( session, async->worker_tids[i])); - async->worker_tids[i] = 0; wt_session = &async->worker_sessions[i]->iface; WT_TRET(wt_session->close(wt_session, NULL)); async->worker_sessions[i] = NULL; @@ -420,7 +419,7 @@ int __wt_async_destroy(WT_SESSION_IMPL *session) { WT_ASYNC *async; - WT_ASYNC_FORMAT *af, *afnext; + WT_ASYNC_FORMAT *af; WT_ASYNC_OP *op; WT_CONNECTION_IMPL *conn; WT_DECL_RET; @@ -435,12 +434,8 @@ __wt_async_destroy(WT_SESSION_IMPL *session) F_CLR(conn, WT_CONN_SERVER_ASYNC); for (i = 0; i < conn->async_workers; i++) - if (async->worker_tids[i] != 0) { - WT_TRET(__wt_thread_join( - session, async->worker_tids[i])); - async->worker_tids[i] = 0; - } - WT_TRET(__wt_cond_destroy(session, &async->flush_cond)); + WT_TRET(__wt_thread_join(session, async->worker_tids[i])); + __wt_cond_destroy(session, &async->flush_cond); /* Close the server threads' sessions. */ for (i = 0; i < conn->async_workers; i++) @@ -459,15 +454,13 @@ __wt_async_destroy(WT_SESSION_IMPL *session) } /* Free format resources */ - af = TAILQ_FIRST(&async->formatqh); - while (af != NULL) { - afnext = TAILQ_NEXT(af, q); + while ((af = TAILQ_FIRST(&async->formatqh)) != NULL) { + TAILQ_REMOVE(&async->formatqh, af, q); __wt_free(session, af->uri); __wt_free(session, af->config); __wt_free(session, af->key_format); __wt_free(session, af->value_format); __wt_free(session, af); - af = afnext; } __wt_free(session, async->async_queue); __wt_free(session, async->async_ops); @@ -499,7 +492,7 @@ __wt_async_flush(WT_SESSION_IMPL *session) */ workers = 0; for (i = 0; i < conn->async_workers; ++i) - if (async->worker_tids[i] != 0) + if (async->worker_tids[i].created) ++workers; if (workers == 0) return (0); diff --git a/src/third_party/wiredtiger/src/async/async_op.c b/src/third_party/wiredtiger/src/async/async_op.c index 6908802dbff..d4ca754b95f 100644 --- a/src/third_party/wiredtiger/src/async/async_op.c +++ b/src/third_party/wiredtiger/src/async/async_op.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014-2016 MongoDB, Inc. + * Copyright (c) 2014-2017 MongoDB, Inc. * Copyright (c) 2008-2014 WiredTiger, Inc. * All rights reserved. * diff --git a/src/third_party/wiredtiger/src/async/async_worker.c b/src/third_party/wiredtiger/src/async/async_worker.c index 11f59ed14f1..57ebe5d8bb1 100644 --- a/src/third_party/wiredtiger/src/async/async_worker.c +++ b/src/third_party/wiredtiger/src/async/async_worker.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014-2016 MongoDB, Inc. + * Copyright (c) 2014-2017 MongoDB, Inc. * Copyright (c) 2008-2014 WiredTiger, Inc. * All rights reserved. * @@ -57,7 +57,6 @@ retry: return (0); if (!F_ISSET(conn, WT_CONN_SERVER_ASYNC)) return (0); - WT_RET(WT_SESSION_CHECK_PANIC(session)); WT_ORDERED_READ(last_consume, async->alloc_tail); } if (async->flush_state == WT_ASYNC_FLUSHING) @@ -282,7 +281,7 @@ WT_THREAD_RET __wt_async_worker(void *arg) { WT_ASYNC *async; - WT_ASYNC_CURSOR *ac, *acnext; + WT_ASYNC_CURSOR *ac; WT_ASYNC_OP_IMPL *op; WT_ASYNC_WORKER_STATE worker; WT_CONNECTION_IMPL *conn; @@ -301,11 +300,10 @@ __wt_async_worker(void *arg) WT_ERR(__async_op_dequeue(conn, session, &op)); if (op != NULL && op != &async->flush_op) { /* - * If an operation fails, we want the worker thread to - * keep running, unless there is a panic. + * Operation failure doesn't cause the worker thread to + * exit. */ (void)__async_worker_op(session, op, &worker); - WT_ERR(WT_SESSION_CHECK_PANIC(session)); } else if (async->flush_state == WT_ASYNC_FLUSHING) { /* * Worker flushing going on. Last worker to the party @@ -342,12 +340,10 @@ err: WT_PANIC_MSG(session, ret, "async worker error"); * Worker thread cleanup, close our cached cursors and free all the * WT_ASYNC_CURSOR structures. */ - ac = TAILQ_FIRST(&worker.cursorqh); - while (ac != NULL) { - acnext = TAILQ_NEXT(ac, q); + while ((ac = TAILQ_FIRST(&worker.cursorqh)) != NULL) { + TAILQ_REMOVE(&worker.cursorqh, ac, q); WT_TRET(ac->c->close(ac->c)); __wt_free(session, ac); - ac = acnext; } return (WT_THREAD_RET_VALUE); } |