summaryrefslogtreecommitdiff
path: root/src/api
AgeCommit message (Collapse)Author
2014-01-07Update copyright notices for 2014.Keith Bostic
Move lang/java and lang/python into the public domain.
2013-06-04Reorder the verbose version output, so the library version comes first.Michael Cahill
refs #564
2013-04-10WT_NOTFOUND is used for things other than "cursor" not found, generalize it.Keith Bostic
2013-01-01Update copyright notice to 2013.Keith Bostic
2012-12-10Add a __wt_panic function that shuts down all of the WiredTiger APIs.Keith Bostic
2012-12-10Add a new error, WT_PANIC, which will be the panic return, ref #215.Keith Bostic
Add an "error handling" section to the documentation so errors are grouped in a single place.
2012-05-04Rework WT_EVENT_HANDLERs.Keith Bostic
Change the WT_SESSION's WT_EVENT_HANDLER reference to be a real structure, and copy values into it instead of simply pointing to the user-specified structure. The argument for using a reference is the application can swap functions whenever it feels like it, the argument against using a reference is that if the application allocates the structure only long enough to call wiredtiger_open, we're going to drop core. We don't document that the structure needs to persist, and if the application wants to swap functions, it can do it inside the function it gives us, so using a real structure doesn't lose any functionality. Change the semantics of the event-handler error function (used to return void, now returns int) and the progress function (used to return int, now returns void). Change the semantics of the erorr and informational handlers so that if the handler returns failure, we fallback to the default behavior. Document the event-handler parameters. Change the code so that a missing handler calls the default handler function: that means a NULL event-handler structure does the right thing, and eliminates the need for __wt_event_handler_default and some initialization code in a few places, and the need to make the default error and informational message handlers look like the application-specified versions. Delete api/api_event.c, move the default informational and error message handlers into support/err.c Delete the default progress message handler entirely, it didn't do anything. Delete include/progress.i (The only function the file had was the default progress handler function, __wt_progress, which is only used by verify and salvage, the compiler can inline it if it wants.) Moved __wt_progress to support/err.c.
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-01-22Update copyright notices to 2012.Keith Bostic
Change the copyright check script to always use the current year. Change the example code copyright notices to document them as freeware, anybody using WiredTiger example code is free to use it in any way they choose, including commercially, WiredTiger claims no rights in such a copy. Minor re-ordering of the standard copyright notice so the preamble is always the copyright notice itself, not the mention of the LICENSE file.
2011-12-28Fix a comment.Keith Bostic
2011-12-25When the engine calls __wt_err on error, it often outputs an errorKeith Bostic
message including the string associated with the error it's returning. We could change all of those to call __wt_errx and depend on the handler doing the right thing, but it's simpler to change the default handler to ignore the error code if appending the error code would duplicate the trailing portion of the error message.
2011-12-14Reorg the api directory into connection and session parts. While in the ↵Michael Cahill
area, rename s_copyright.lst to s_copyright.list to match the rest of the scripts. --HG-- rename : dist/s_copyright.lst => dist/s_copyright.list rename : src/api/event_handler.c => src/api/api_event.c rename : src/api/strerror.c => src/api/api_strerror.c rename : src/api/config.c => src/config/config.c rename : src/api/config_check.c => src/config/config_check.c rename : src/api/config_collapse.c => src/config/config_collapse.c rename : src/api/config_concat.c => src/config/config_concat.c rename : src/api/config_def.c => src/config/config_def.c rename : src/api/api_conn.c => src/conn/conn_api.c rename : src/schema/schema_pack.c => src/packing/packing.c rename : src/api/api_pack.c => src/packing/packing_api.c rename : src/api/api_session.c => src/session/session_api.c rename : src/api/session_btree.c => src/session/session_btree.c extra : rebase_source : 766beca25d6fa0cc6a2802c08c091d5144ffb248
2011-12-08To avoid problems with a tree being closed from underneath an application ↵Michael Cahill
thread evicting a page, first check that the application thread has the tree open.
2011-12-06Move the reconcile state from btree handles to session handles: it is not ↵Michael Cahill
shared.
2011-12-05Make eviction parameters tunable, to force more or less aggressive eviction.Michael Cahill
2011-12-05Make internal_item_max and leaf_item_max default to allow 10 items per page ↵Michael Cahill
and go as low as 2.
2011-11-29automatically prepend verbose messages with their particular tag lineKeith Bostic
and a colon.
2011-11-28Add a "verify" verbose option.Keith Bostic
--HG-- extra : rebase_source : 3f63e0cc71a3a83ed0a7d88eb6ad4e4b796cedb0
2011-11-26Split the reconciliation into reconciliation and eviction pieces, andKeith Bostic
make the reconciliation code a reader of the page, only. This split requires a new structure, WT_PAGE_MODIFY, which has the most recent reconciliation information for the page. All of the imref_XXX routines (create an in-memory page from a reconciled image) code goes away, the current in-memory page is left alone during reconciliation. Remove the eviction server's retry code: sync is a reader and so should never fail (close is a single lock and so should already not have ever failed). Remove the code in the Btree close routine that special-cased the root page being empty, the eviction code now handles that explicitly, there isn't any reason to do it in two places. Replace the WT_PAGE_SET_MODIFIED and WT_PAGE_IS_MODIFIED macros with the inline functions; the code additionally sets up the WT_PAGE_MODIFY structure for the page in the cases where it hasn't yet been initialized. Rework the description verification code once again: it's OK for the freelist addr to be invalid if there's no freelist, root address should not be invalid unless the file is empty. Replace WT_PAGE_MERGE and WT_PAGE_DELETED with WT_PAGE_REC_EMPTY, _REPLACE and _SPLIT, where the flag now only reflects the action taken during the last reconcilation. Replace the reconciliation flags (REC_ evict, locked, salvage) with "force" and "single" (force isn't yet used, and I'm sure this will collide with Michael's changes. Add a new stat "rec_written", it's the pages written during reconciliation (not yet used, though). Add a new verbose string "evict", which is eviction as separate from the eviction server. --HG-- extra : rebase_source : b0e25955f279b3b41743014dc6c1801805d11805
2011-11-23Change the default cache size to 100MB.Michael Cahill
2011-11-23Rename config keys for page and overflow sizes to ↵Michael Cahill
{internal,leaf}_{item,page}_max
2011-11-10Avoid session buffers, just call malloc/free directly.Michael Cahill
refs #133
2011-11-15Wrap error return documentation in named section, link to it from @return ↵Michael Cahill
sections.
2011-11-08Fix tests to match config string changes for dump/load.Michael Cahill
2011-11-08Make handling of empty lists in config strings robust against empty inputs.Michael Cahill
This fixes table-level dump / load.
2011-11-07Switch to a trylock for operations that need an exclusive handle lock: we ↵Michael Cahill
don't expect them to be mixed with ordinary cursor access.
2011-11-04Change the SESSION->{verify,salvage,dumpfile,sync} methods to have aKeith Bostic
common subroutine that cycles through the Btree handles associated with the URI, and calls an underlying subroutine on each handle. This fixes a bug where you couldn't salvage a "table". Change Btree salvage to work if there are no pages in the file (it now re-writes the description of the file and returns success). --HG-- extra : rebase_source : cc8aa025ebcfc97183e23f1fd9c704f3222c015b
2011-11-04SESSION->dumpfile is verify under the covers, and doesn't needKeith Bostic
WT_BTREE_NO_EVICTION. --HG-- extra : rebase_source : 4640cd964c3532b8bbe1192d98b5735c5765dce9
2011-11-04Rename WT_MTX to WT_CONDVARMichael Cahill
--HG-- rename : src/include/mutex.h => src/include/mutex.i extra : rebase_source : f39daa80138346eef1580f2a7ab31b332b7062fa
2011-11-04Fix btree locking to permit salvage on an open handle.Michael Cahill
--HG-- extra : rebase_source : 3147d986324efb8c6d10b62f27e44df21efb547c
2011-11-04Remove the workQ code entirely.Michael Cahill
--HG-- extra : rebase_source : 56e5571bac921fc1bad22ef93b6cdfd637a65496
2011-11-03KNF.Keith Bostic
--HG-- extra : rebase_source : 8b6972cc5e517143816ff907ce278238d8dba71d
2011-11-03Remove the workQ -- have application threads notify the read and eviction ↵Michael Cahill
servers directly.
2011-10-18Remove the "multithread" configuration for connections.Michael Cahill
2011-10-23__wt_config_concat should just concatenate the config strings.Michael Cahill
It should not call __wt_config_get, which resolves the final value of each key: just write the key/value pairs into the buffer and let parser that deal with the result resolve the values. The previous example of concatenating "A=,A=,A=" with "A=value" should result in "A=,A=,A=,A=value".
2011-10-28Split file cursors out into their own list in the session handle.Michael Cahill
2011-11-02Running the test suite with HAVE_DIAGNOSTIC configured fails because weKeith Bostic
abort on page checksum errors, assuming they should never happen. That's incorrect, embedded libraries should really survive just about any error, and we're using WT_FAILURE/WT_FAILURE_RET in too many places (which is probably my fault). Remove WT_FAILURE/WT_FAILURE_RET and the support __wt_failure function, and review callers, changing callers into __wt_errx/return(XXX) pairs so we do not drop core when running the test suite. If you really want to drop core, there's still WT_ASSERT/WT_ASSERT_RET. There were a few places where the schema code didn't return an error status if the plan was wrong -- I can't see any reason not to return an error, so we do now.
2011-11-02Clean up a couple of places where we declared and cleared a WT_BUF, but neverKeith Bostic
used it. Create a standard error message for "unknown object type".
2011-10-22Rewrite __wt_config_concat: the problem is the final version of theKeith Bostic
configuration string can be larger than the sum of the lengths of the individual configuration strings. For example, if the first configuration string is "A=,A=,A=", and the second is "A=value", the final string is "A=value,A=value,A=value,A=value", the loop expands all occurrences of A to its final value. A couple of minor fixes to avoid leaking memory on error, and to handle a caller that messes up and doesn't pass us what we're expecting.
2011-10-21Push handling of locking for bulk cursors into __wt_curfile_create -- fixes ↵Michael Cahill
bulk loading into simple tables. refs #126
2011-10-21When getting a file exclusive, don't clear the open flag.Michael Cahill
closes #100
2011-10-21Make sure WT_BTREE_BULK is set on the tree when a bulk cursor is opened.Michael Cahill
closes #100
2011-10-19Stop overloading the "overwrite" flag for column-store by adding theKeith Bostic
"append" flag. --HG-- extra : rebase_source : 8fa26b36db21f820a70465ec0315e8a425ff6848
2011-10-18Clarify a comment.Michael Cahill
2011-10-10Rename __wt_buf_sprintf/__wt_buf_sprintf_append to __wt_buf_fmt andKeith Bostic
__wt_buf_catfmt, discard a couple of __wt_buf_init calls that aren't necessary. --HG-- extra : rebase_source : cf5b101e7b1975f31d8fc7cce99b7de9fe33a72e
2011-10-10If the type is "choices", then you have specify a string value for theKeith Bostic
keyword, be add an explicit error for that case. --HG-- extra : rebase_source : 24f94fc4bc97d56deb878d56605f2690f54ea886
2011-10-10Split __wt_buf_sprintf into two functions: __wt_buf_sprintf that sets theKeith Bostic
buffer to a formatted string, and __wt_buf_sprintf_append that appends a formatted string to the existing buffer contents. --HG-- extra : rebase_source : d0269e698a9d0cddd4aa10436314f765857acc02
2011-10-07Delete trailing blank lines from files.Keith Bostic
2011-10-07Make dump cursors work.Keith Bostic
Replace the dump and printable boolean configuration strings with a dump string-valued configuration, where the value can be "print" or "hex". Change the dump utility to default to printable output (remove the -p flag and add a -x flag to configure a hexadecimal dump). Change the dump utility to not output record numbers, by default, when dumping column-store files, add a -k option to override that and dump the record numbers. The table cursor get-key routine didn't correctly handle primary keys that happened to be record numbers: rewrite it to just use the standard get-key routine, based on the primary cursor. Also, the table cursor routines didn't support "raw" configurations, although the underlying code was there, add the configuration string. --HG-- extra : rebase_source : e489d7912ffb31d433a64861a9e4dda07dcbcdc9
2011-10-07Implement custom collators.Michael Cahill
refs #118