Commit Graph

27 Commits

Author SHA1 Message Date
Keith Bostic
344a714c3d Upgrade copyright notices from 2015 to 2016. 2016-01-01 16:37:39 -05:00
Keith Bostic
4631ec39c3 WT-2246: Don't use the maximum record number (UINT64_MAX) to flag an
append search, use WT_RECNO_OOB instead, UINT64_MAX is a valid record
number, we could theoretically legitimately want to search for it.

Add tests that basic CRUD operations work on the maximum possible record
number.

Fix overflow bugs in the variable-length column-store page-search and
append-list reconciliation.
2015-12-10 15:00:50 -05:00
Keith Bostic
7ce6cdfcc4 The WT_CBT_MAX_RECORD flag isn't necessary, the returned comparison
information is sufficient.

The dangerous code is __col_insert_search(), if it changed what was
returned when not finding an exact match, the upper-level cursor code
is going to break.

Add two big honkin' comments to make sure we don't make dangerous
changes in the future, and remove the flag.
2015-12-04 16:44:33 -05:00
Keith Bostic
a5bb492b41 When looking for the next-larger item (__col_insert_search_gt), stay
at the same level if the checked record is equal to the searched for
record (can't happen in the current use of this code, but it's the
correct thing to do in a skiplist).

When looking for the next-smaller item (__col_insert_search_lt), the
search still has to be greater-than, reference #1835.
2015-03-31 07:42:01 -04:00
Keith Bostic
0c9f1341e2 When we find a record in the slot's update skiplist, but then want to
jump past the rest of the deleted records, we have to adjust based on
the starting record of the slot, use the page's repeat array to find
that starting record.

Another run at the __col_insert_search_gt (the greater-than skiplist
search), hopefully it's finally correct.
2015-03-28 13:15:53 -04:00
Keith Bostic
835bbdfa6a typo 2015-03-27 15:40:09 -04:00
Keith Bostic
b5edc28c25 Cleanup, fix, simplify the cursor-insert-greater-than search, add a
corresponding less-than search and hook it into the WT_CURSOR.prev
function. This runs better than before, but there are still problems.
2015-03-27 14:40:36 -04:00
Keith Bostic
488d064b45 There can be huge gaps in the variable-length column-store name space
appearing as deleted records. If more than one deleted record, do the
work of finding the next useful record. Reference #1807.
2015-03-27 10:07:16 -04:00
Keith Bostic
1f9098871a Copyright notices: add MongoDB, update to 2015. 2015-01-04 14:07:56 -05:00
Keith Bostic
d225ca62a1 Switch the WT_PAGE union #defines from pu_xxx to pg_xxx. 2014-02-24 12:56:22 -05:00
Keith Bostic
b174e85b58 Add pu_xxx_field #defines for the rest of the page-union fields. 2014-02-05 16:07:24 -05:00
Keith Bostic
4adabd868a Add a new level of indirection on internal pages so there's a way to
split them by atomically replacing the WT_REF array with a new one.
2014-02-05 15:45:54 -05:00
Keith Bostic
5b509b7220 Update copyright notices for 2014.
Move lang/java and lang/python into the public domain.
2014-01-07 10:30:12 -05:00
Keith Bostic
963d37a4e6 Update copyright notice to 2013. 2013-01-01 09:45:50 +00:00
Michael Cahill
c7258fd327 Don't automatically fail inserts if the write generation check fails: compare keys instead. 2012-11-16 18:19:48 +11:00
Keith Bostic
bf9d408c89 Back out the WT_INSERT_HEAD to WT_SKIP_HEAD change: we're not going to use
WT_INSERT_HEAD for anything other than inserts into Btree pages.
2012-01-26 15:58:09 +00:00
Keith Bostic
d473094676 Update copyright notices to 2012.
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-22 18:52:07 +00:00
Keith Bostic
86b7711a1d Rename WT_INSERT_HEAD to be WT_SKIP_HEAD, some (but not all) of the
changes of the underlying structure names to match actual use with
the name.
2012-01-19 15:10:44 +00:00
Keith Bostic
a807d3e186 Split u.col_leaf into two parts (u.col_fix and u.col_var), and move the
column-store append/update lists from WT_PAGE into WT_PAGE_MODIFY in
order to shrink WT_PAGE.

--HG--
extra : rebase_source : 6d7df0f5b50351cabfec464eccfa0b49b8b0f35a
2011-12-18 17:34:11 +00:00
Keith Bostic
5b20429c11 fix a comment, __col_last_recno works for fix-len pages, too.
--HG--
extra : rebase_source : a913d5bf54b1e110e1223d903178ebe60a129280
2011-10-18 12:12:44 +00:00
Michael Cahill
0ba39490e9 If we find a match when searching a skip list, fill in the stack.
This is needed for fast reverse scans through skip lists.
refs #111
2011-10-11 12:06:40 +11:00
Michael Cahill
61d9e9c16f Make cursor->prev use "skip list fingers" to run in O(log N) time rather than O(N).
closes #111
2011-10-05 01:34:46 +11:00
Keith Bostic
86b098058c Make column-store search function naming match row-store (rename
__col_insert_search() to __col_insert_search_match(), and rename
__col_insert_search_stack() to __col_insert_search()).  Minor cleanups
in those functions to always test if the WT_INSERT_HEAD argument is
NULL.

The column-store insert code didn't catch the fact that there was a
race: if we find the record that's being inserted, then we know another
thread of control must have inserted it, and so we return WT_RESTART.
Found by inspection, we've never run any of this code multi-threaded.

Bug fix in the row-store search code, don't test if the address of
inshead->tail[0] is NULL, test inshead->tail[0] itself.
2011-09-23 15:08:46 +00:00
Keith Bostic
c7a273e697 Return a valid WT_INSERT reference when we don't find an exact match -- while
that's vanishingly unlikely when search a column-store, application's calling
cursor->search_near() with a recno past the end of the file takes that path.
Rather than special case the cursor next/prev code, I made the column search
function match the row seaarch function, that seems cleaner.

--HG--
extra : rebase_source : 36b0d5b31426ae09c1ae68cda3d73a8686a15511
2011-09-22 14:44:43 +00:00
Keith Bostic
43ee0f9df1 Fix spelling 2011-09-12 11:24:19 +00:00
Michael Cahill
0271de8489 Keep track of the end of skip lists, fast-path appends.
closes #56
2011-09-12 22:52:31 +10:00
Keith Bostic
bae4cd52b0 Replace column-store page-extension code with a new skiplist, maintained
on the last page of the tree.

Replace the col_extend serialization function with a new append function

Pin the last page of the tree in memory so we can access it without
first acquiring a hazard reference.  And, don't acquire/release hazard
references on pinned pages.

Don't ever try to evict a pinned page during a sync call.

Change sync to quit trying after 5 attempts -- the page is busy.

Always flush memory before we release a hazard referenced on a page
we've just pinned, make sure the pin hits memory before the hazard
reference is released.

Fix bugs where the row- and column-store code was calling the row_key
serialization function incorrectly, the WT_INSERT field was not
allocated and should not have been freed, also the insert serialization
function had a similar problem.  Once this change was made, we no longer
needed to track the sizes of these items.

Change the row- and column-store code to not use per session buffers
for on-page structures, specifically the insert list heads, use normal
allocation memory instead.

Change the test/format code to test insert with fixed-length files,
again.

Create column.i: it's a few routines from cursor.i and the search
routine from col_srch.c.

Remove the btree/col_extend.c file, no longer used.

Remove the column_internal_extend, column_leaf_extend configuration
values, no longer used.

Remove the functions that let the workQ increase the count of pages in
memory, no longer used.

--HG--
rename : src/include/cursor.i => src/include/column.i
extra : rebase_source : ee32aeda7db964def30da0920abe6aaf59ba62a1
2011-09-11 10:45:03 +00:00