Commit graph

102 commits

Author SHA1 Message Date
Rich Prohaska
fefecf69dd merge brt_truncate into 1032b. addresses #1032
git-svn-id: file:///svn/toku/tokudb.1032b@7803 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:27 -04:00
Bradley C. Kuszmaul
6b654211c0 free diskblocks. Addresses #1195.
git-svn-id: file:///svn/toku/tokudb.1195@7679 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:25 -04:00
Bradley C. Kuszmaul
7a1f2d5706 Write tests for {{{toku_dump_brt()}}}. Addresses #1195.
git-svn-id: file:///svn/toku/tokudb.1195@7461 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:24 -04:00
Yoni Fogel
df1c7a9379 Addresses #903
Created function that peeks at both key and value at the same time
(to avoid repeated OMT calls).
This was worth 4-5% performance in scanscan --lwc --prelock --prelockflag


git-svn-id: file:///svn/tokudb@5386 c7de825b-a66e-492c-adef-691d508d4ae1
2008-07-28 17:55:14 +00:00
Rich Prohaska
efc9a8aa39 merge db->truncate to main. closes #968
git-svn-id: file:///svn/tokudb@5218 c7de825b-a66e-492c-adef-691d508d4ae1
2008-07-21 02:34:13 +00:00
Yoni Fogel
18b35fc088 Addresses #993
Merge branch 993 back into main.

git-svn-id: file:///svn/tokudb@5141 c7de825b-a66e-492c-adef-691d508d4ae1
2008-07-16 22:23:29 +00:00
Bradley C. Kuszmaul
a4f4d06ff9 Merge the streamlining changes from #911. Fixes #911.
git-svn-id: file:///svn/tokudb@4500 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-12 20:32:22 +00:00
Yoni Fogel
b846ceaa9a Addresses #860
Removed extra mallocs and memcopies for toku_c_get
when the dbts use anything other than DB_DBT_USERMEM

git-svn-id: file:///svn/tokudb@4121 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-24 17:22:14 +00:00
Bradley C. Kuszmaul
f60c54cad0 Fixes #22, #333 and Addresses #818:
* Create an exact bit (#818) for the sums (but doesn't calculate it.)
 * Add magic to the file header (#22)
 * Add per-subdb dupsort flags. (#333).

Did
{{{
$ cd tokudb
$ svn merge -r3990:4094 https://svn.tokutek.com/tokudb/tokudb.818/
$ cd ..
$ svn delete tokudb.818
}}}


git-svn-id: file:///svn/tokudb@4095 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-22 21:28:00 +00:00
Bradley C. Kuszmaul
b07dd27c62 Start testing {{{toku_brt_keyrange}}}.
There are 4 cases
 1. flattened nodup (tested in this changeset)
 1. unflattened nodup (untested)
 1. flattened dupsort (untested)
 1. unflattened dupsort (untested)


git-svn-id: file:///svn/tokudb@3931 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-13 12:14:38 +00:00
Yoni Fogel
467c49d564 Addresses #394
Bugfix with the way data was copied out to static buffers.
Now (again) copies to cursor's temp storage if it is not a temporary cursor
if it is a db handle call, or a temporary cursor, it will use the db's temporary storage.

git-svn-id: file:///svn/tokudb@3863 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-08 17:38:10 +00:00
Yoni Fogel
9abb92dc4b Addresses #394
Merge branch tokudb.394 back into trunk

git-svn-id: file:///svn/tokudb@3841 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-07 20:03:13 +00:00
Bradley C. Kuszmaul
8511ea7372 Log db close so that recovery will work right if the same db is opened and closed repeatedly.
Also the file numbers can thus be reused.
Don't pass the BRT into the flush commands, since the BRT may no longer be present.
Put a counter in to see how many rollback records are present.  (Addresses #698.)
Increment the file version to 4.
Fixes #545, #703.

Note: All the tests pass except
 * Many cxx tests are getting valgrind errors.  (Addresses #716.  Possibly causes #716.)
 * {{{test_log9.recover}}} fails with "Binary files ... differ".  These will presumably be fixed by #711 or #714.  (Addresses #711, #714.)
 * {{{test_log10.recover}}} fails.   There are two failures:
  1. A valgrind problem (see #718.)  (Addresses #718.  Possibly causes #718.)
  1. The "Binary files ... differ" issue.


git-svn-id: file:///svn/tokudb@3486 c7de825b-a66e-492c-adef-691d508d4ae1
2008-04-17 03:11:55 +00:00
Bradley C. Kuszmaul
a8a3471e43 Remove dead code for expunging fifos. Fixes #684.
git-svn-id: file:///svn/tokudb@3392 c7de825b-a66e-492c-adef-691d508d4ae1
2008-04-09 18:52:03 +00:00
Bradley C. Kuszmaul
83d416fa09 Merge the 558 branch back to the main with
{{{
svn merge -r3061:3225 https://svn.tokutek.com/tokudb/tokudb.558
}}}

Fixes #630.
Addresses #558.


git-svn-id: file:///svn/tokudb@3226 c7de825b-a66e-492c-adef-691d508d4ae1
2008-04-02 23:40:36 +00:00
Bradley C. Kuszmaul
538a507a30 Make rollback do the right thing in some cases fo internal nodes. Addresses #556.
git-svn-id: file:///svn/tokudb@2955 c7de825b-a66e-492c-adef-691d508d4ae1
2008-03-19 19:23:45 +00:00
Bradley C. Kuszmaul
99b75cabcd Deal with the multithreaded cursor DBT memory allocaiton problem. Addresses #538. (I'm going to write a few more tests before calling it fixed.)
git-svn-id: file:///svn/tokudb@2854 c7de825b-a66e-492c-adef-691d508d4ae1
2008-03-15 19:06:39 +00:00
Bradley C. Kuszmaul
712fcc5da1 Many things:
Make txn->abort work without bombing out for {{{test_txn_abort5}}} one case. Fixes #431.
 Start writing {{{test_txn_abort6}}}.   Addresses #443.
 Try to write a test for #399 and #400, but haven't managed to reproduce the problem.  Addresses #399, #400.
 Write a test for #332.  Addresses #332.


git-svn-id: file:///svn/tokudb@2406 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-25 22:46:48 +00:00
Yoni Fogel
44894c394a Addresses #368
Deals with NULL transactions in an INIT_TXN environment.
Does not deal with NULL txn cursors yet.
Also adds DB_AUTO_COMMIT

git-svn-id: file:///svn/tokudb@2252 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-11 20:00:19 +00:00
Rich Prohaska
a5a62d6696 txn parameter added to some brt functions. closes #316
git-svn-id: file:///svn/tokudb@1941 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-28 20:49:10 +00:00
Rich Prohaska
d2d80add96 first cut or new cursors merge to trunk. addresses #250
git-svn-id: file:///svn/tokudb@1881 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-25 15:43:37 +00:00
Bradley C. Kuszmaul
9fe0391206 Add copyright 2008. Fixes #283.
git-svn-id: file:///svn/tokudb@1844 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-24 15:10:32 +00:00
Bradley C. Kuszmaul
970234a759 Fix db-benchmark-test. Fixes #300.
git-svn-id: file:///svn/tokudb@1841 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-24 13:51:34 +00:00
Rich Prohaska
a9e1d29612 add Db::fd closes #231
git-svn-id: file:///svn/tokudb@1601 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-11 14:38:49 +00:00
Rich Prohaska
aed37ec51c first cut of delboth addresses #182
git-svn-id: file:///svn/tokudb@1478 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-02 20:33:51 +00:00
Yoni Fogel
7331e46492 Added DB_UNKNOWN to db.h
You can use DB_UNKNOWN as a dbtype (as long as you don't use DB_EXCL) in dbopen,
and then it will load the flags from the file.

tokudb_dump
    Now supports duplicates/sorted duplicates.
tokudb_load will give a warning about any duplicate duplicate loads
    but will continue with the rest of the data.

Closes #148
Closes #166

git-svn-id: file:///svn/tokudb@1086 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-11 19:34:21 +00:00
Yoni Fogel
123dd77a8f c_pget makes certain never to touch original parameters until/unless success happens.
Code is cleaner now with less special cases, handles DB_DBT_(MALLOC|REALLOC|USERMEM) as well as no flags now.
Closes #144

git-svn-id: file:///svn/tokudb@1037 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-10 18:54:12 +00:00
Rich Prohaska
be7474282c add key and data size limit check in db->put. closes #50
git-svn-id: file:///svn/tokudb@832 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-29 19:32:53 +00:00
Bradley C. Kuszmaul
9f54dcef61 Rename a bunch of symbols to toku_symbols. Addresses #8.
git-svn-id: file:///svn/tokudb@823 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-29 15:09:14 +00:00
Bradley C. Kuszmaul
6b2f1c61b7 Rename a bunch of symbols to toku_symbols. Addresses #8.
git-svn-id: file:///svn/tokudb@822 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-29 14:44:03 +00:00
Bradley C. Kuszmaul
1a155723d6 Add copyrights using #ident on the top of newbrt sources. Addresses #54.
git-svn-id: file:///svn/tokudb@817 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-29 14:18:54 +00:00
Bradley C. Kuszmaul
2020f63610 A bunch of symbols that don't start with toku_ are made static or start with toku_. Addresses #8.
git-svn-id: file:///svn/tokudb@800 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-28 19:00:21 +00:00
Bradley C. Kuszmaul
9da9621873 Stop passing DB* everywhere. Instead store it in the BRT and PMA structs. Fixes #39.
git-svn-id: file:///svn/tokudb@761 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-26 21:51:36 +00:00
Rich Prohaska
88378bda52 search in a BRT with duplicate keys is equivalent to a DB_SET cursor get.
Addresses #19



git-svn-id: file:///svn/tokudb@748 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-25 18:17:01 +00:00
Rich Prohaska
0d868bc7b4 close #17 dont put any DB_ flags in the tokudb header
git-svn-id: file:///svn/tokudb@707 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-22 01:05:00 +00:00
Bradley C. Kuszmaul
5784ee45fb Log header
git-svn-id: file:///svn/tokudb@699 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-21 13:07:49 +00:00
Bradley C. Kuszmaul
13f29b60cc Make fopen parse, and log only the fname relative to the env, not the whole name with the env
git-svn-id: file:///svn/tokudb@689 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-20 21:20:05 +00:00
Bradley C. Kuszmaul
b904eec0d7 Make all external symbols in brt-verify.o start with toku_. Addresses #8
git-svn-id: file:///svn/tokudb@679 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-20 00:35:31 +00:00
Rich Prohaska
caad214427 use TOKU_DB_DUPSORT internally
git-svn-id: file:///svn/tokudb@664 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-19 20:22:56 +00:00
Yoni Fogel
f978d2859e Modified tokudb to work with test_db_already_exists
git-svn-id: file:///svn/tokudb@643 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-19 16:30:50 +00:00
Bradley C. Kuszmaul
574016ffd3 More logging stuff
git-svn-id: file:///svn/tokudb@623 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-18 12:48:36 +00:00
Yoni Fogel
db9d08dda5 THINGS DONE:
0   Readded missing files i.e. regression tests.
    1
        svn add the new test (test_db_remove_subdb)
        Commit db->remove and the tokudb.bugs (bug 47 describes it)
    2
        Modified tests to use a test subdirectory for temp files,
        removed unneeded flags to DB_ENV->open
        test_db_dup.c
        test_db_already_exists.c
        test_db_close_no_open.c
        test_db_open_notexist_reopen.c
    3
        Added bug 48 (memory leak in DB->remove
        Need Valgrind to verify.
        svn add: test_db_remove_memleak.c


git-svn-id: file:///svn/tokudb@579 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-15 19:09:31 +00:00
Bradley C. Kuszmaul
48f0ad74b5 Up
git-svn-id: file:///svn/tokudb@519 c7de825b-a66e-492c-adef-691d508d4ae1
2007-11-14 17:58:38 +00:00
Bradley C. Kuszmaul
710cf343a3 Merge logging
git-svn-id: file:///svn/tokudb@371 c7de825b-a66e-492c-adef-691d508d4ae1
2007-09-28 17:11:22 +00:00
Rich Prohaska
b0e3bdca20 change the cache table to act on the size of the objects rather than the number of objects stored in it
note that when the object size is 1, the cache table acts on the number of objects as before.

change the tree algorithms to update the object size in the cache table when the object is unpinned.



git-svn-id: file:///svn/tokudb@334 c7de825b-a66e-492c-adef-691d508d4ae1
2007-09-21 17:55:49 +00:00
Rich Prohaska
4564dd3b9a brt cursor get both feature
git-svn-id: file:///svn/tokudb@301 c7de825b-a66e-492c-adef-691d508d4ae1
2007-09-12 20:30:36 +00:00
Rich Prohaska
204f68ed3f implement delete under brt cursor
git-svn-id: file:///svn/tokudb@291 c7de825b-a66e-492c-adef-691d508d4ae1
2007-09-11 18:32:10 +00:00
Rich Prohaska
c10712dee6 Change to implement delete by key. A BRT_DELETE command is injected into the
tree.  It replaces any INSERT or DELETE command with the same key at all
interior nodes.  It is translated into a PMA delete operation at a leaf
node.  

The database file format was changed for the contents of interior node
buffers to include a 1 byte type field.  There are currently 2 types:
BRT_INSERT and BRT_DELETE.




git-svn-id: file:///svn/tokudb@278 c7de825b-a66e-492c-adef-691d508d4ae1
2007-09-06 21:36:45 +00:00
Bradley C. Kuszmaul
de47452c10 use the new db.h
git-svn-id: file:///svn/tokudb@276 c7de825b-a66e-492c-adef-691d508d4ae1
2007-09-06 20:13:56 +00:00
Bradley C. Kuszmaul
0243ed5122 Fix up type conflicts with ydb.c
git-svn-id: file:///svn/tokudb@37 c7de825b-a66e-492c-adef-691d508d4ae1
2007-07-24 14:34:05 +00:00