Commit graph

1568 commits

Author SHA1 Message Date
Bradley C. Kuszmaul
9ebb4b4080 Don't always fill with zeros. Fixes #917. Gives some speedups on random.
git-svn-id: file:///svn/tokudb@4543 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-15 17:09:14 +00:00
Rich Prohaska
5c3b4003e8 strange return in BDB. addresses #838
git-svn-id: file:///svn/tokudb@4541 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-15 12:44:45 +00:00
Bradley C. Kuszmaul
10f21e7224 Did a {{{svn merge}}} for {{{tokudb.907}}} and deleted {{{tokudb.907}}}.
Fixes #907.


git-svn-id: file:///svn/tokudb@4524 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-14 01:38:53 +00:00
Bradley C. Kuszmaul
802d83994b test_838 now passes. Addresses #838
git-svn-id: file:///svn/tokudb@4521 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-13 18:27:22 +00:00
Rich Prohaska
f3eefae802 fix the nightly regressions. port the 838 test to BDB. addresses #838
git-svn-id: file:///svn/tokudb@4514 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-13 11:18:34 +00:00
Yoni Fogel
b4b9748da8 Addresses #912
Use ybt->size field if ybt->ulen field is unset (for DB_DBT_REALLOC).

git-svn-id: file:///svn/tokudb@4505 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-12 23:13:04 +00:00
Yoni Fogel
acf688ef2e Closes #912
toku_db_set_* (the dbt setting functions)
no longer require atomicity for ENOMEM cases.
Also, in the case of realloc, we only alloc new memory if
the new size is larger than the old size, or the new size is less than
half of the old size.

Code has some simplifications due to lesser atomicity requirements.

Modified src/tests/test_db_dbt_mem_behavior.c to take into account
that DB_DBT_REALLOC now uses the ulen field.

git-svn-id: file:///svn/tokudb@4504 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-12 23:07:04 +00:00
Yoni Fogel
fe3cd46d32 Closes #914
git-svn-id: file:///svn/tokudb@4502 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-12 20:46:09 +00:00
Yoni Fogel
19b775ea35 Addresses #838
Added test_838 to tests that should fail.

git-svn-id: file:///svn/tokudb@4501 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-12 20:37:26 +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
Rich Prohaska
da3b69356c merge branch 838 to main. addresses #838
git-svn-id: file:///svn/tokudb@4493 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-12 13:53:39 +00:00
Yoni Fogel
df7304b264 Closes #908
Implements DB->pre_acquire_table_lock
Also optimized lock tree for table write locks

git-svn-id: file:///svn/tokudb@4480 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-11 20:09:47 +00:00
Yoni Fogel
83bd37f5bc Addresses #908
Add DB->pre_acquire_table_lock to headers

git-svn-id: file:///svn/tokudb@4479 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-11 19:38:51 +00:00
Bradley C. Kuszmaul
8102ccf804 Fixup command line parsing
git-svn-id: file:///svn/tokudb@4473 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-11 18:02:43 +00:00
Yoni Fogel
62fa995705 Closes #904
Skip lock tree overhead (marshalling and calling)
when appropriate due to DB_PRELOCKED/DB_PRELOCKED_WRITE

git-svn-id: file:///svn/tokudb@4469 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-11 06:08:13 +00:00
Yoni Fogel
5764fdef8e Addresses #904
Add DB_PRELOCKED_WRITE flag

git-svn-id: file:///svn/tokudb@4462 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-10 19:46:00 +00:00
Bradley C. Kuszmaul
61974814e4 Implement a lighter versio nof {{{DBC->c_getf_next}}}. Addresses #902.
git-svn-id: file:///svn/tokudb@4460 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-10 18:56:10 +00:00
Bradley C. Kuszmaul
2d0adda90c Use the {{{db->pre_acquire_read_lock}}} method for scanscan.
So to use the lightweight cursors with the prelock one does:
{{{
./scanscan-tokudb --prelock --nohwc --lwc
}}}

Addresses #893.


git-svn-id: file:///svn/tokudb@4454 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-10 16:37:56 +00:00
Yoni Fogel
917a127c2f Renamed toku_rt_forest to rt_forest
git-svn-id: file:///svn/tokudb@4453 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-10 16:06:50 +00:00
Bradley C. Kuszmaul
750998c9da Implement {{{DBC->c_getf_next}}}, with a simple test. Addresses #902.
git-svn-id: file:///svn/tokudb@4452 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-10 15:39:31 +00:00
Bradley C. Kuszmaul
e0d124119b Pack the OMT. Fixes #897.
git-svn-id: file:///svn/tokudb@4421 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-08 16:14:31 +00:00
Bradley C. Kuszmaul
b2dd143d95 Clean up scanscan. Addresses #820.
git-svn-id: file:///svn/tokudb@4420 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-08 15:53:50 +00:00
Yoni Fogel
d9e9792d8c Addresses #893
Parameters to pre_lock are supposed to be const DBT*'s instead of DBT*'s.

git-svn-id: file:///svn/tokudb@4403 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-06 18:09:04 +00:00
Yoni Fogel
e22d67bb8e Addresses #893
Implement db->pre_acquire_read_lock(), db->dbt_pos_infty(), and db->dbt_neg_infty()
functions.

Example usage to lock entire table:
db->pre_acquire_read_lock(db, txn, db->dbt_neg_infty(), NULL, db->dbt_pos_infty(), NULL);
(Above is for db with no duplicates, i.e. primary index).

For db with duplicates:
db->pre_acquire_read_lock(db, txn, db->dbt_neg_infty(), db->dbt_neg_infty(), db->dbt_pos_infty(), db->dbt_pos_infty());

Will return same lock error codes as db calls do (when locks fail).
0 = success
DB_LOCK_NOTGRANTED = failed to obtain the lock.
We can theoretically sleep and try again here.

If you want to grab from DBT* A to infinity..
db->pre_acquire_read_lock(db, txn, A, NULL, db->dbt_pos_infty(), NULL);


git-svn-id: file:///svn/tokudb@4402 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-06 17:50:38 +00:00
Yoni Fogel
98feb20905 Addresses #889
Leaf boundary test now checks left to right and right to left.

git-svn-id: file:///svn/tokudb@4401 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-06 16:45:38 +00:00
Yoni Fogel
72c0171ab6 Addresses #889
Additional tests to verify we handle provdel leaf entries correctly
(when we need to cross between leaf boundaries.

git-svn-id: file:///svn/tokudb@4400 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-06 16:39:38 +00:00
Bradley C. Kuszmaul
33a145cf5d Don't run manyfiles.bdb. Addresses #891.
git-svn-id: file:///svn/tokudb@4397 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-06 13:07:25 +00:00
Bradley C. Kuszmaul
b3f35f217e Hash the cachetable too. Fixes #891.
git-svn-id: file:///svn/tokudb@4388 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-05 22:09:59 +00:00
Rich Prohaska
68e6ca2097 need to update the cursor when skipping provisionally deleted leaf entries. addresses #889
git-svn-id: file:///svn/tokudb@4367 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-04 22:58:07 +00:00
Bradley C. Kuszmaul
d12442d53e Implement 2nd scanscan, and allow txns to be turned off.
git-svn-id: file:///svn/tokudb@4351 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 21:55:47 +00:00
Bradley C. Kuszmaul
efe394f6b7 Finish cleanup. Addresses #855, #856.
git-svn-id: file:///svn/tokudb@4348 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 20:06:03 +00:00
Bradley C. Kuszmaul
d3815694af Add a bdb-layer test for the regression introduced by [4330]. Addresses #855, #856.
git-svn-id: file:///svn/tokudb@4347 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 20:03:29 +00:00
Yoni Fogel
f9982d4a47 Addresses #855, #856.
Bugfix in integration of omt cursors.
We were considering provdel leaf entries as not deleted.

git-svn-id: file:///svn/tokudb@4343 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 16:45:15 +00:00
Yoni Fogel
43d9a43f20 Addresses #855, #856. Reworked ExpectedO(1) cursors to be as close
as possible to the O(logn) cursors.
Semantics are now as close as possible, and may be a little faster now.

git-svn-id: file:///svn/tokudb@4339 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 04:25:28 +00:00
Yoni Fogel
2e01e6d00d Addresses #855, #856. Invalidates cursor on a failed toku_omt_find
git-svn-id: file:///svn/tokudb@4337 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 03:42:56 +00:00
Yoni Fogel
540d7247cd Addresses #855, #856. More 0s become NULLs. toku_omt_cursor_prev checks for index = 0
so that it can invalidate and return EINVAL (since index is unsigned)

git-svn-id: file:///svn/tokudb@4336 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 02:23:39 +00:00
Yoni Fogel
352566ea2f Addresses #855, #856. Standardize index to be unsigned, 32 bits. Used NULL instead of 0
git-svn-id: file:///svn/tokudb@4335 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 02:10:40 +00:00
Bradley C. Kuszmaul
77639084ce Get rid of ERANGE in favor of EINVAL. And fix up a couple of test cases. Addresses #855, #856.
git-svn-id: file:///svn/tokudb@4333 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 01:28:40 +00:00
Bradley C. Kuszmaul
9185a8549b Go to the O(logN)-integer-compare implementation, which is about 5% faster than the O(1) implementation. I cannot explain it. The old stuff is now in {{{omt-with-o1-cursors/}}}. Addresses #855, #856.
git-svn-id: file:///svn/tokudb@4329 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-03 00:50:14 +00:00
Yoni Fogel
eb41b7c0c7 Addresses #855, #856. Integrate OMT cursors with BRT for DB_PREV
git-svn-id: file:///svn/tokudb@4328 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-02 21:35:02 +00:00
Yoni Fogel
2ef26e0057 Converted all dos files to unix format (endlines only changed)
git-svn-id: file:///svn/tokudb@4327 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-02 21:28:03 +00:00
Yoni Fogel
6f7da78963 Integrate the omtcursors into the BRT. So far only DB_NEXT is implemented. Addresses #855, #856. Added missing information needed for commit
git-svn-id: file:///svn/tokudb@4326 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-02 21:21:32 +00:00
Bradley C. Kuszmaul
33d04ef55f Integrate the omtcursors into the BRT. So far only DB_NEXT is implemented. Addresses #855, #856.
git-svn-id: file:///svn/tokudb@4325 c7de825b-a66e-492c-adef-691d508d4ae1
2008-06-02 20:52:12 +00:00
Yoni Fogel
9c1a3057c9 Addresses #855
Bugfix in merge of tokudb.855 into trunk
Forgot to update all users of the omt

git-svn-id: file:///svn/tokudb@4309 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-30 21:58:32 +00:00
Vincenzo Liberatore
bf759aa8bb Closes #855 Merged back into trunk
git-svn-id: file:///svn/tokudb@4308 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-30 20:41:12 +00:00
Bradley C. Kuszmaul
5952205957 After swapping the order of the free and the alloc of the leafentry, I messed up because the alloc might move the leafentry, so the leafentry's size must be computed while the pointer is still good. Fixes #881.
git-svn-id: file:///svn/tokudb@4276 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-29 21:38:46 +00:00
Bradley C. Kuszmaul
e7150422f4 Probably repairs #880. Addresses #880.
git-svn-id: file:///svn/tokudb@4259 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-29 17:12:45 +00:00
Bradley C. Kuszmaul
0c5f094e26 Probably repairs #880. Addresses #880.
git-svn-id: file:///svn/tokudb@4258 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-29 17:05:03 +00:00
Bradley C. Kuszmaul
d4a80654d1 Simplfy the logic a little. Addresses #880.
git-svn-id: file:///svn/tokudb@4256 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-29 16:28:37 +00:00
Bradley C. Kuszmaul
8f6bbeb225 Please run the test case under the debugger (compiled with -O0), and then in gdb when it bombs do the following commands.
{{{
(gdb) print original_mp
(gdb) print last_total_size_needed
(gdb) up
(gdb) print *mp
(gdb) where
}}}


Addresses #880. 


git-svn-id: file:///svn/tokudb@4255 c7de825b-a66e-492c-adef-691d508d4ae1
2008-05-29 16:21:28 +00:00