Commit graph

2344 commits

Author SHA1 Message Date
Bradley C. Kuszmaul
08d183f468 Add test for {{{sync_synchronize}}}. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11680 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Bradley C. Kuszmaul
e832247e8e Add test for {{{sync_lock_test_and_set}}}. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11679 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Bradley C. Kuszmaul
03917acaf2 Add a test for the {{{__sync_lock_test_and_set}}} intrinsic. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11677 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Bradley C. Kuszmaul
3e024139cf Add a test for the {{{__sync_lock_test_and_set}}} intrinsic. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11676 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Bradley C. Kuszmaul
c2a17a61ff Add a test for the {{{__sync_lock_test_and_set}}} intrinsic. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11675 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Bradley C. Kuszmaul
f205dde77b Write better timing code for trylock. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11673 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Bradley C. Kuszmaul
a9b8ed234c Write better timing code for trylock. Refs #1738.
git-svn-id: file:///svn/toku/tokudb@11672 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Barry Perlman
0124e8fe7d Addresses #1736, #1398 Move extern declaration of STRADDLE_HACK_INSIDE_CALLBACK from cachetable.c to cachetable.h to allow build on Windows.
git-svn-id: file:///svn/toku/tokudb@11660 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Barry Perlman
646141a74c Addresses #1736, #1398 When inside straddle_hack callback don't use normal rwlock_read_lock for get_and_pin, but simply increment reader count instead. This prevents deadlock where callback waits for end_checkpoint to release write lock, but while end_checkpoint waits for callback to release read lock.
git-svn-id: file:///svn/toku/tokudb@11658 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
61a2a36b8c Addresses #1730 Put in attempted fix for race condition.
Closign and opening a cachefile is now threadsafe (race condition when trying to open during a close).
If race condition hits, it will stall the open till the close is done.
All opens are now single threaded.  This can be improved if it causes a bottleneck.

Added comments for possible future race conditions after lock refinement.

git-svn-id: file:///svn/toku/tokudb@11644 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Rich Prohaska
84cf612572 add interactive help to brtdump. closes #1732
git-svn-id: file:///svn/toku/tokudb@11637 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
dca1d5ce2a Addresses #1694 Merged checkpoint stress upgrades from 2.0.0 into main
git-svn-id: file:///svn/toku/tokudb@11603 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
482ff6bd1b Removed debug entry
git-svn-id: file:///svn/toku/tokudb@11569 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
09944a690e Closes #1693 Zombie brts pass off responsibilities to others.
When a new brt is open, it takes over responsibilities of all existing zombie brts, and closes them.
When a brt closes, if other brts exist, it passes off responsibilities and closes immediately.  It only becomes a zombie if no other brts exist.

(Everything above is in context of a single header).

git-svn-id: file:///svn/toku/tokudb@11533 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
c3ef730280 Addresses #1691 Modified root fifo tests to test additional cases.
git-svn-id: file:///svn/toku/tokudb@11532 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
40f04fbc80 Re-port to linux after porting to windows
git-svn-id: file:///svn/toku/tokudb@11528 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
6d3fdbd7a1 Addresses #1694 Port checkpoint_stress to windows
git-svn-id: file:///svn/toku/tokudb@11526 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
f2889d3e9a Printf warnings (port to windows)
git-svn-id: file:///svn/toku/tokudb@11521 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Barry Perlman
82c423dda2 Addresses #1694 Improved checkpoint_stress user interface.
git-svn-id: file:///svn/toku/tokudb@11509 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Barry Perlman
0f8fdfa00c Fixes #1694 Added stress test script to Makefile.
git-svn-id: file:///svn/toku/tokudb@11508 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Barry Perlman
6e6e27c739 Addresses #1694 Checkpoint stress test
git-svn-id: file:///svn/toku/tokudb@11506 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Barry Perlman
0dfea88d8c Add structure to perform random acts while awaiting crash.
git-svn-id: file:///svn/toku/tokudb@11497 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
33ebb7b3c0 Improve checkpoint tests
git-svn-id: file:///svn/toku/tokudb@11496 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Yoni Fogel
b04619c7e2 Add scribble, sleep.
git-svn-id: file:///svn/toku/tokudb@11494 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Rich Prohaska
192b37fe3f fix some more root fifo tests for bdb. closes #1721
git-svn-id: file:///svn/toku/tokudb@11488 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Rich Prohaska
94898878d0 run the root fifo tests on bdb. addresses #1721
git-svn-id: file:///svn/toku/tokudb@11487 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:51 -04:00
Rich Prohaska
9a6e0c6c4e check for invalid cachesize. addresses #1720
git-svn-id: file:///svn/toku/tokudb@11475 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
cded4738f5 Added multiple dictionaries, improved logic to simulate crash.
git-svn-id: file:///svn/toku/tokudb@11468 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
1e8c3a4cff Accommodate change made to checkpoint_test.h (for purpose of checkpoint_stress).
git-svn-id: file:///svn/toku/tokudb@11466 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
fcb1a08cac Add checkpoint_stress to BDB_DONTRUN_TESTS list.
git-svn-id: file:///svn/toku/tokudb@11464 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
a89f2aea08 Added checkpoint_stress test (not complete),
modified other checkpoint tests for common code.


git-svn-id: file:///svn/toku/tokudb@11446 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
d06afaee2d Addresses #1510 Added some breadcrumbs to checkpoint function,
may be useful for debugging.  In any case, they're harmless.

git-svn-id: file:///svn/toku/tokudb@11410 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
46d1cde8f5 Addresses #1691 Further fixes to a race condition where refcounts in a cachefile were not protected by any lock.
See [11371] removed most of the causes of this (by limiting the places where refcount was edited).
Now (cachefile) refcounts are protected by the cachetable_lock.

git-svn-id: file:///svn/toku/tokudb@11408 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Zardosht Kasheff
d6be5a49d8 addresses #1685
get handlerton compiling on windows

git-svn-id: file:///svn/toku/tokudb@11405 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
35b7e290ca Addresses #1510 Change argv to support getopt, remove const for ease of use.
git-svn-id: file:///svn/toku/tokudb@11400 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
92341bbe66 Improve structure of checkpoint tests.
git-svn-id: file:///svn/toku/tokudb@11395 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
35090f156a Addresses #1691 Fix bug where abort(truncate) could crash us.
Remove transactions' need to count references to cachefiles (they already have references to brts)
Errors in rolling back certain functions were ignored (r = blah; return something_else);
They are now reported, so diskfull had to be updated to expect ENOSPC under certain circumstances.

git-svn-id: file:///svn/toku/tokudb@11371 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Rich Prohaska
81d6b8f213 another root fifo test case. addresses #1691
git-svn-id: file:///svn/toku/tokudb@11370 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
bba8a8a3c7 Addresses #1691 Txn that created or locked when empty is now per dictionary (in header instead of brt)
We clear it when the transaction closes (this means we cannot change it when it is already set till that transaction finishes).
This fixes a crash in windows in root_fifo_2.tdb

git-svn-id: file:///svn/toku/tokudb@11365 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Rich Prohaska
05a88a4784 add --checkpoint-period to db-benchmark-test. closes #1702
git-svn-id: file:///svn/toku/tokudb@11361 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Rich Prohaska
0e465396a8 fixup root_fifo tests. addresses #1691
git-svn-id: file:///svn/toku/tokudb@11360 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
140f8d751d Streamline makefile for windows
git-svn-id: file:///svn/toku/tokudb@11359 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
9d934a9e44 Addresses #1510 Added tests that open/insert/close unrelated dictionary during checkpoint.
git-svn-id: file:///svn/toku/tokudb@11346 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
a6aae346c4 Addresses #1510 Add test that dictionary being checkpointed can be closed during a checkpoint.
git-svn-id: file:///svn/toku/tokudb@11345 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
4f91cd57cd Addresses #1510 Add more checkpoint testing.
Verify that inserts done during checkpoint do not appear 
in checkpoint snapshot but do appear in dictionary after 
checkpoint is complete.


git-svn-id: file:///svn/toku/tokudb@11344 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Barry Perlman
d560f9c9a4 Addresses #1697 Incorrect value was used to set new file size
in logic that shrinks files (to free disk space) when possible.

git-svn-id: file:///svn/toku/tokudb@11340 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
7060dff3b5 Windows port
git-svn-id: file:///svn/toku/tokudb@11339 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
fad8c20000 Addresses #1640 Bugfixes in rwlock (windows) implementation.
git-svn-id: file:///svn/toku/tokudb@11338 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
91fd49318c Windows ports Addresses #1665
git-svn-id: file:///svn/toku/tokudb@11337 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00
Yoni Fogel
fe30f59982 Fix typo = -> ==
git-svn-id: file:///svn/toku/tokudb@11336 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:50 -04:00