summaryrefslogtreecommitdiff
path: root/src/include/error.h
AgeCommit message (Collapse)Author
2014-01-07Update copyright notices for 2014.Keith Bostic
Move lang/java and lang/python into the public domain.
2013-11-15Merge branch 'develop' into fine-grained-durabilityMichael Cahill
2013-11-14Don't use condition variables in log code when no-sync is configured.Alex Gorrod
Also add some statistics to the log slot code.
2013-11-13Change compaction to not block checkpoints: during the part of compactionKeith Bostic
that views page modification/reconciliation information, compaction and reconciliation both lock the page.
2013-04-19Returning WT_PANIC takes precedence over any other error.Keith Bostic
2013-03-14Some functions with WT_ASSERT calls don't use the session handle for anyKeith Bostic
other purpose, keep the compiler quiet in those cases.
2013-03-14Cleanup due to s_allAlex Gorrod
2013-03-14Make WT_ASSERT a no-op when not in DIAGNOSTIC mode.Alex Gorrod
2013-01-01Merge branch 'develop' into dirty-disableKeith Bostic
2013-01-01Update copyright notice to 2013.Keith Bostic
2013-01-01Change reconciliation to yield immediately after determining the state of aKeith Bostic
child page in diagnostic runs, and to save the previous state of the page in the WT_RECONCILE structure. This is what I've been using to debug #419.
2012-12-28Simplify WT_PANIC_XXX and friends.Keith Bostic
I needed a return version, which made 3, but we only have 2 cases: (1) one that returns WT_PANIC without any error value for the associated message, and (2) one that doesn't return WT_PANIC (ever), but does have an error value for the associated message. Case #1 is now WT_PANIC_ERR, case #2 is WT_PANIC_RETX, and that leaves WT_PANIC_ERRX for a version that doesn't return WT_PANIC (ever) but does have an error value for the associated message, and WT_PANIC_RET for a version that returns WT_PANIC and has an error value for the associated message, if we ever need them.
2012-12-28Another set of changes to make checkpoints outside of the evictionKeith Bostic
server thread work. The last set of changes had (at least) two problems: First, the test to avoid selecting a dirty page for eviction was insufficient. It appeared in __evict_walk_file, which is before eviction has exclusive access, the test should still appear there to avoid selecting pages there is no hope of evicting, but should also appear in __rec_review after the page is locked down to ensure no pages modified after selection, but before final review, are written. Second, the test to avoid selecting a dirty page for eviction wasted performance because we couldn't select a page ever considered for modification (regardless of whether or not it was actually modified), because racing with the checkpoint thread reviewing an internal page that referenced the evicted page could drop core when the evicted page's modification structure disappeared. This set of changes adds a test in __rec_review to resolve the first problem. The second problem is trickier, and messes with page states (oh joy!). The key is to inform page reconciliation if it's being called by the eviction server thread or a checkpoint thread. In the case of being called by the eviction server thread, any child page of an internal page that's in the WT_REF_LOCKED state is in a stable, in-memory state, because the calling thread set the WT_REF_LOCKED state. In the case of being called by the checkpoint thread, any child page of an internal page that's in the WT_REF_LOCKED state is in a temporary state because it's been locked by eviction. It will either be evicted (and the page state reset to WT_REF_DISK), or skipped (and the page state reset to WT_REF_MEM). Regardless, the reconciliation within the checkpoint thread has to wait on that state change. This is all built on top of a set of flags passed into reconciliation, which additionally offers better control over skipping updates on a page. We now explicitly flag if reconciliation should (1) quit early if unable to entirely clean a page, set by the eviction code, (2) panic if it's unable to entirely clean a page, set by sync during file close and by salvage, or (3) not worry about it, set by the checkpoint passes. Reference #419.
2012-12-19Wrap __wt_panic uses in a macro. Update LSM panic code to be betterAlex Gorrod
documented.
2012-12-18Add panic calls to appropriate places in LSM.Alex Gorrod
2012-12-05Prioritize errors so system errors aren't lost. #388Susan LoVerso
2012-11-21After an LSM merge, fault in some pages before the new tree goes live to ↵Michael Cahill
avoid stalling application threads.
2012-06-20Finish the implementation of reconfigure methods: allow flags to be turned ↵Michael Cahill
off, add support for verbose and cache size.
2012-06-15First set of changes for moving all checkpoint/snapshot calls into theKeith Bostic
session.checkpoint method, ref #235. Add the "target" configuration to checkpoint, specifies a list of targets to be checkpointed; checkpointing a list of targets is the same as checkpointing a database, that is, the checkpoint is a set of consistent snapshots. Re-write the checkpoint mehtod documentation to list the new target config string. Make __wt_schema_worker signature match __wt_conn_btree_apply, and __wt_meta_btree_apply (the cfg argument follows the func argument). Remove cursor declaration in __wt_txn_checkpoint() it's never used. Add WT_ERR_NOTFOUND_OK macro, allows and corrects WT_NOTFOUND return.
2012-06-01Simplify the regular expression in s_style for non-GNU grep.Michael Cahill
Fix a couple more cases where we could return in bad places.
2012-05-15__wt_assert is marked "noreturn", so it shouldn't return.Michael Cahill
2012-05-03Move all of the WiredTiger.wt configuration information into the turtle file;Keith Bostic
instead of having snapshots read/write the turtle file, change the metadata routines to read certain, specific key/value pairs from the turtle file, see issue #192.
2012-03-09Overwrite pages when they're discarded to make it more likely we catchKeith Bostic
a thread trying to use them.
2012-01-24More eviction locking cleanups and fixes.Michael Cahill
To avoid a freed page pointer ending up on the request list, check the page state while holding the LRU lock before putting it one the request list. In __rec_excl_page(), we can write dirty pages after we acquire the exclusive lock -- if we can't get an exclusive lock, it means somebody else is in that part of the tree, so there's no urgency in doing the write, and if we can get the exclusive write, then we know the page will be clean when we get to the end. Instead of copying all hazard references in the system in order to check for a conflict, just do a linear search for the reference we are interested in. Take more care with forced eviction: keep the page in either WT_REF_EVICTING or WT_REF_LOCKED states so that application threads drain and eviction is not starved.
2012-01-23Fix a comment, the loop tests EBUSY, not WT_RESTART.Keith Bostic
2012-01-23Some cleanup of the hazard code. In particular:Michael Cahill
* error handling: use of WT_RET in functions that are only expected to return a boolean (e.g., WT_REF(__wt_realloc(...)) in __hazard_exclusive. Switch to zero for success and EBUSY if the page is already locked. This shouldn't make it out to applications but at least is from the same namespace as ENOMEM or other system errors. * two threads calling __hazard_exclusive concurrently were sharing memory in cache->hazard, with unpredictable results. * the WT_REF_LOCKED state was being used for multiple things. Add a WT_REF_EVICTING state to prevent multiple threads choosing the same page from the eviction queue.
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.
2012-01-02Add the WT_RET_MSG and WT_ERR_MSG macros that output a message and then return.Keith Bostic
--HG-- rename : src/include/debug.h => src/include/error.h