summaryrefslogtreecommitdiff
path: root/src/include
AgeCommit message (Collapse)Author
2012-03-20Updates based on review of recent eviction changes.Michael Cahill
2012-03-19Have the eviction server start a new walk when it reaches half way through ↵Michael Cahill
the list of pages selected for LRU evction.
2012-03-17Keep the current eviction point in memory.Michael Cahill
2012-03-17../src/os_posix/os_time.c:33: warning: implicit declaration of function ↵Michael Cahill
'gettimeofday'
2012-03-16Rename block_alloc.c -> block_ext.cKeith Bostic
2012-03-16Generalize the "free list" to be an "extent list", we're going to need 3Keith Bostic
lists to support persistent snapshots.
2012-03-15Inline __wt_page_modify_init (we call it in the search function), andKeith Bostic
don't check if WT_PAGE.modify is NULL before calling it, the function checks.
2012-03-15OS X doesn't support clock_gettime, add support for gettimeofday.Keith Bostic
2012-03-15Rename "close_method" argument to "discard", snapshots move us awayKeith Bostic
from the whole close/sync dichotomy.
2012-03-15Add the __wt_epoch function, returns the local time-of-day.Keith Bostic
2012-03-15Move btree/bt_root.c -> session/session_root.cKeith Bostic
2012-03-15Only signal the eviction server condvar if we have reason to believe it ↵Michael Cahill
isn't running.
2012-03-11Always have an exclusive lock on btree handles before calling ↵Michael Cahill
__wt_conn_btree_close, apart from the conn->close case which is inherently single-threaded.
2012-03-11Close btree handles in the list: otherwise we can't safely remove or rename ↵Michael Cahill
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
2012-03-10Switch the function name order, use conn_btree_XXX instead ofKeith Bostic
conn_XXX_btree.
2012-03-10Changes for issue #178.Keith Bostic
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.
2012-03-09Overwrite pages when they're discarded to make it more likely we catchKeith Bostic
a thread trying to use them.
2012-03-09Get rid of the pinned flag: it is no longer used.Michael Cahill
2012-03-09Account for memory allocated when reading a page into cache.Michael Cahill
2012-02-24There's a race between the page eviction thread updating the parent'sKeith Bostic
page reference (unblocking the waiting readers/writers), and the page eviction thread discarding the page, including the tree's append list. We can fix the race by moving the tree's append list discard code into the eviction code so the tree's append list is discarded before we permit readers/writers to proceed (bad because we don't want page discard code in the eviction code and because readers/writers will wait longer than they'd otherwise wait), or by moving the tree append list into the page's modification information (bad because we're wasting 8 bytes in every column-store page that is being modified and isn't the last page in the tree). This commit does the latter, mostly because it gets rid of the page's "last page" flag and seems cleaner, plus, I suspect it's less likely to be involved in future bugs.
2012-02-24Fix a comment.Keith Bostic
2011-12-23Allow application threads to evict pages from any tree: maintain a count of ↵Michael Cahill
threads doing LRU in each tree and wait for activity to drain when closing.
2012-02-24Don't keep the last page of column stores pinned: it prevents eviction.Michael Cahill
2012-02-24Re-run dist/s_all.Michael Cahill
2012-02-23The huffman encoding documentation doesn't mention the leading "utf8" orKeith Bostic
"utf16" strings that need to prefix the file name.
2012-02-23Make buffer alignment configurable in wiredtiger_open. Only align scratch ↵Michael Cahill
buffers and buffers used to write blocks. --HG-- extra : rebase_source : 4849675711929de7d890fc312e713df5e442b1a6
2011-12-05Add support for direct I/O, with the config "direct_io=(data,log)".Michael Cahill
--HG-- extra : rebase_source : c9ece039e84f16dcb4cf4fe8419e6de04f970a13
2012-02-20Pass the configuration stack through __wt_btree_reopen: opening for salvage ↵Michael Cahill
looks for the "force" configuration.
2012-02-18Replace the __wt_btree_reopen() function with __wt_conn_reopen_btree()Keith Bostic
that does a full close/open pair instead of trying to fast-track it. This will be slower, but reopens aren't common, and this avoids having to worry about state held in the WT_BTREE structure across a verify or salvage operation.
2012-02-16Move "root:F" and "version:F" entries for files into the value for "file:F", ↵Michael Cahill
so there is only a single record per file.
2012-02-16Note the wiredtiger_open config string "multiprocess" is not yetKeith Bostic
supported.
2012-02-14Move connection-list handling from the btree code to conn/conn_btree.c.Keith Bostic
2012-02-09Remove WT_PAGE_FORCE_EVICT: the WT_REF_EVICTING state makes it obsolete.Michael Cahill
2012-02-09Update documentation to cover cursor duplication.Michael Cahill
refs #161 --HG-- extra : rebase_source : 19979afe98569f2348b730e93913b2b6362587a1
2012-02-08Minor clarification of the meaning of WT_NOTFOUND: it's a cursor operationKeith Bostic
only, not a "search" operation. Part of #163.
2012-02-08If a session or connection method is about to return WT_NOTFOUND (someKeith Bostic
underlying object was not found), map it to ENOENT, only cursor methods return WT_NOTFOUND. Fixes #163.
2012-02-06Implement cursor duplication via WT_SESSION::open_cursor.Michael Cahill
closes #161 --HG-- extra : rebase_source : d81a47356b3fe2441707cf82d2c3f81c27e62810
2012-02-06Remove a GCC-specific function attribution used for build testing.Michael Cahill
--HG-- extra : rebase_source : 0ab3eaa41269e81c4e1f0d952306c87f97fc1f3b
2012-02-02Convert the BSD 4-clause license to the BSD 3-clause license:Keith Bostic
From the Open Source Initiative OSI web site: Historical Background: The original license used on BSD Unix had four clauses. The advertising clause (the third of four clauses) required you to acknowledge use of U.C. Berkeley code in your advertising of any product using that code. It was officially rescinded by the Director of the Office of Technology Licensing of the University of California on July 22nd, 1999. He states that clause 3 is "hereby deleted in its entirety."
2012-02-02Fixes to make test_schema02 pass. Much more careful checking and cleanup ↵Michael Cahill
during complex object creation. Check that the number of named columns matches the key and value formats. Use the schema tracking code to cleanup after errors. Detach btree handles from tables when closing. refs #131
2012-02-02Remove the config string from WT_CURSOR::close: it is no longer required and ↵Michael Cahill
simplifies the code.
2012-02-02Move the stat cursor "clear" config to WT_SESSION::open_cursor.Michael Cahill
2012-02-01WT_CURSOR->close methods shouldn't return immediately if there's badKeith Bostic
configuration; copy API_CALL to API_CALL_TRET and change the WT_ERR call to be WT_TRET. This means changing API_SESSION_INIT to always set ret to 0 (WT_TRET requires ret already be set), and remove the "err:" labels from all of the cursor close routines, nothing should ever jump to err: in those routines. closes #115
2012-02-01The target name for rename operations should be a URI, not a raw name.Michael Cahill
2012-01-31Handle errors from __wt_cursor_init.Michael Cahill
refs #153
2012-01-31Fix uninitialized warnings with GCC 4.6.Michael Cahill
2012-01-31Fix uninitialized warnings with GCC 4.2.Michael Cahill
2012-01-31Implement WT_CURSOR::equals to test if two cursors are equal (primarily in ↵Michael Cahill
support of truncate). refs #149
2012-01-31Add WT_CURSOR::uri containing the cursor source URI, primarily in support of ↵Michael Cahill
WT_CURSOR::equals. closes #153
2012-01-31Connections are always exclusive, we don't need to config key.Michael Cahill