| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
handle after an exclusive operation because it will be cached in sessions and
we don't check WT_BTREE_OPEN every time we open a cursor.
Make sure that open flags are passed through the schema layer so that files are accessed with appropriate settings.
|
|
|
|
|
| |
list so that any future accesses open them with whatever flags are required.
Spin trying to get exclusive access to a handle in the open path: we don't want block waiting on open cursors if we race to open the file.
|
|
|
|
|
|
|
| |
--enable-silent-rules").
--HG--
extra : rebase_source : 4af5f56a6a695af668c98ab5823d591a52bb843d
|
|
|
|
|
| |
--HG--
extra : rebase_source : 2cc50ff7b2851dc0a4a5f60aaf9b5ca9da6c9634
|
| |
|
|
|
|
| |
runs in diagnostic mode.
|
| |
|
|
|
|
| |
__wt_conn_btree_close, apart from the conn->close case which is inherently single-threaded.
|
|
|
|
| |
it is NUL terminated.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
them.
Use a separate spinlock in the OS layer to manage lists of file handles so that we can safely call close while holding the general purpose connection spinlock.
Fixes test failures in test_base02 (among others).
refs #178
|
| |
|
|
|
|
|
|
| |
ref count was 1 and we called __wt_session_remove_btree; that's no
longer the case, so we have to release our exclusive lock to avoid
deadlock.
|
| |
|
| |
|
|
|
|
| |
conn_XXX_btree.
|
|
|
|
| |
no matter what path we took.
|
|
|
|
|
|
|
| |
simple." no longer makes any sense, that's the underlying function's
problem because we aren't passing it a session handle (and it handles
it correctly). Use NULL as the "not allocated" flag value rather than
the default session.
|
|
|
|
|
|
|
|
|
|
| |
Close/discard all of the files but the schema file first, because writing
those files may result in updates to the schema file.
Updating the schema file may add the schema table to the session's list
of btrees: we're about to discard the underlying schema table file object,
so manually clear that list before closing the last file and discarding
the session handle.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The underlying problem is btree files weren't completely closed before
they could be re-opened. This behavior can be triggered by using a
new session on every operation (see the new -S flag to the test/thread
program). Instead of repeating the dance we do on open, I'm leaving
the btree handles in the connection list for the life of the connection.
The reason I'm going in this direction is that any application that opens
new sessions on each operation (for example, simple scripting language
APIs), will be doing file I/O on every open, and I'd rather avoid that.
(In other words, performance will just suck, instead of being unusable:
it's about 60% slower at the moment).
Most applications don't operate on enough files to care that files aren't
actually discarded, but if you have a long-lived application that opens
thousands of unique files, this approach will eventually see problems
(long file open times as the list of files gets long, and file-descriptor
consumption).
Detailed changes:
When connections are closed, create a session and discard the btree
handles. I think this fixes a long-standing bug in closing a connection,
that, for any reason, still has open btree handles, we'd drop core when we
tried to evict the pages because we were closing them using the default
session handle. I don't see any reason we can't allocate a new session
during connection->close, but this is worth careful review.
Change the session close of a btree to be a reference decrement, and
nothing else. (We don't need the reference right now, but any future
house-cleaning solution will likely need a reference count, so I'm
leaving it in.)
Change __wt_session_lock_btree() to always re-open the tree, even if
it's the first time the session is opening the file. Now that we're
caching handles in the connection layer, there's no reason to believe
the existing handle is open in any particular configuration.
Move set/clear of the WT_BTREE_OPEN flag into the connection btree handle
code, it's cleaner. I actually don't think we need the WT_BTREE_OPEN flag
any longer, but I'm not totally convinced of that, and we may need it when
we do cleanup.
|
|
|
|
| |
handle on every operation. This tests issue #178.
|
|\ |
|
| |
| |
| |
| | |
a thread trying to use them.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows rec_evict.c to simply set the WT_REF state to WT_REF_MEM after all
failures, and fixes a bug where pages on the forced eviction queue would end up
with state WT_REF_MEM, meaning they could be chosen for eviction multiple
times.
The tradeoff is that when building a tree from scratch that is larger than the
cache size, the eviction thread may never get exclusive access to the single
leaf page in order to evict it. I've added a yield to the eviction server path
to give application threads a chance to leave the page, but that won't help in
cases of genuine contention (though we've never had a complete answer for that
case).
closes #175
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
are failing when we notice a page that can't be merged, (rather than
continuing on and attempting to push out the full tree), and noticing
that a page is empty and can't be evicted during review, instead of in
the parent-page-update routine.
|
| |
|
| |
|