diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-10-03 11:36:35 +1100 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-10-03 11:36:35 +1100 |
commit | a7d8f125b9f7db197d20800802016a671d9949c5 (patch) | |
tree | 7084f736abe44c9e57e929d2be08ec28154825de /src/third_party/wiredtiger/src/conn/conn_dhandle.c | |
parent | a7efca41eb8b864f38239a77e2816b24c48fa899 (diff) | |
download | mongo-a7d8f125b9f7db197d20800802016a671d9949c5.tar.gz |
Import wiredtiger: 6f561957cb5606f504f9fe5a124c80386b210b1a from branch mongodb-3.6
ref: e2c927fa58..6f561957cb
for: 3.5.14
WT-3230 automatic style checking: function local variable declarations
WT-3252 Remove the reconciliation WT_BOUNDARY structure.
WT-3430 Add statistics tracking transaction ID/timestamp queue usage
WT-3437 Evaluate improvements to tuning of number of eviction workers
WT-3449 Get the Helium software running again.
WT-3457 Enhance checkpoint scrub algorithm
WT-3468 Ensure time comparison is done in thread-safe manner
WT-3474 Extend Python timestamp rollback test case
WT-3510 Add tests to check different sized timestamps and timestamps turned off
WT-3511 Add test for timestamp changing partway during a multi-step transaction
WT-3512 Add tests to catch improper usage of timestamp API
WT-3524 Test format likely to pin cache full when enabling timestamps
WT-3533 eviction handle walk can race with handle re-open
WT-3537 Split pages when nothing can be written
WT-3543 Ensure that failed checkpoints cleanup properly
WT-3555 Streamline open cursor for tables
WT-3556 remove wtstats support from WiredTiger
WT-3557 Make test/format ignore unknown keywords
WT-3561 test/recovery hangs with timestamps disabled
WT-3571 clsm_open_cursors() set incorrct chunk->count
WT-3572 format should limit runs to 6 hours.
WT-3574 timestamp abort does not need to increment with atomic op
WT-3575 ASCII statistics log printing
WT-3576 Update test_timestamp09 to use integer comparison of timestamps
WT-3578 Failed to parse oldest timestamp '0': zero not permitted
WT-3581 format: unexpected checkpoint resolution
WT-3588 test/format references freed memory.
WT-3589 replace return checks and testutil_die() pairs, with testutil_check().
WT-3590 Keep data consistent if writes fail during a clean shutdown
WT-3595 Make sure the Python example gets the right _wiredtiger.so
WT-3601 Coverity 1381365: bt_split.c:__split_ref_move() resource leak
WT-3602 compatible=(release=2.9) is insufficient for downgrading to 2.9
WT-3603 format threads always traverse the same RNG space.
WT-3605 LSM doesn't support type 'r'
WT-3606 reconfigure compatibility error paths leave system in modified state
WT-3609 Coverity 1381438: change __wt_panic to handle a NULL session argument
WT-3610 Relax commit timestamp ordering check
WT-3614 Full-build Friday lint
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_dhandle.c')
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_dhandle.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c index aa12718cd69..56a37cf16eb 100644 --- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c +++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c @@ -223,15 +223,14 @@ __wt_conn_dhandle_close( /* * Mark the handle dead (letting the tree be discarded later) if - * it's not already marked dead, our caller allows it, it's not - * a final close, and it's not a memory-mapped tree. (We can't - * mark memory-mapped tree handles dead because we close the - * underlying file handle to allow the file to be removed and - * memory-mapped trees contain pointers into memory that become - * invalid if the mapping is closed.) + * it's not already marked dead, and it's not a memory-mapped + * tree. (We can't mark memory-mapped tree handles dead because + * we close the underlying file handle to allow the file to be + * removed and memory-mapped trees contain pointers into memory + * that become invalid if the mapping is closed.) */ bm = btree->bm; - if (!discard && mark_dead && !final && + if (!discard && mark_dead && (bm == NULL || !bm->is_mapped(bm, session))) marked_dead = true; @@ -413,6 +412,10 @@ __wt_conn_dhandle_open( WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_CLOSING_NO_MORE_OPENS)); + /* Turn off eviction. */ + if (dhandle->type == WT_DHANDLE_TYPE_BTREE) + WT_RET(__wt_evict_file_exclusive_on(session)); + /* * If the handle is already open, it has to be closed so it can be * reopened with a new configuration. @@ -426,11 +429,11 @@ __wt_conn_dhandle_open( * in the tree that can block the close. */ if (F_ISSET(dhandle, WT_DHANDLE_OPEN)) - WT_RET(__wt_conn_dhandle_close(session, false, false)); + WT_ERR(__wt_conn_dhandle_close(session, false, false)); /* Discard any previous configuration, set up the new configuration. */ __conn_dhandle_config_clear(session); - WT_RET(__conn_dhandle_config_set(session)); + WT_ERR(__conn_dhandle_config_set(session)); switch (dhandle->type) { case WT_DHANDLE_TYPE_BTREE: @@ -479,6 +482,9 @@ err: if (btree != NULL) F_CLR(btree, WT_BTREE_SPECIAL_FLAGS); } + if (dhandle->type == WT_DHANDLE_TYPE_BTREE) + __wt_evict_file_exclusive_off(session); + return (ret); } @@ -779,7 +785,7 @@ restart: WT_WITH_DHANDLE(session, dhandle, WT_TRET(__wt_conn_dhandle_discard_single( - session, true, false))); + session, true, F_ISSET(conn, WT_CONN_PANIC)))); goto restart; } @@ -805,7 +811,7 @@ restart: WT_TAILQ_SAFE_REMOVE_BEGIN(dhandle, &conn->dhqh, q, dhandle_tmp) { WT_WITH_DHANDLE(session, dhandle, WT_TRET(__wt_conn_dhandle_discard_single( - session, true, false))); + session, true, F_ISSET(conn, WT_CONN_PANIC)))); } WT_TAILQ_SAFE_REMOVE_END return (ret); |