Commit graph

155 commits

Author SHA1 Message Date
Yoni Fogel
972e1f6cf2 addresses #2155 refs[t:2155] Reverse part of r15848.
We run 'backward' recovery and 'forward recovery' on the item we turn around on, so do not set 'forward saw checkpoint begin' state
till we're in forward recovery.

git-svn-id: file:///svn/toku/tokudb@15849 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:52 -04:00
Yoni Fogel
3ab29cbd36 Addresses #2155 refs[t:2155] Renamed variables,
Added missing state transaction (turn around on checkpoint begin with no transactions)
Added error checking for unlink (anything but 0/ENOENT is real error)

Changes due to code review with Barry

git-svn-id: file:///svn/toku/tokudb@15848 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:52 -04:00
Rich Prohaska
0054c5cceb add sensible recovery tracing refs[t:2177]
git-svn-id: file:///svn/toku/tokudb@15845 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:52 -04:00
Yoni Fogel
6b7c5bdfff Closes #2155 closes[t:2155] Forward recovery split
* Before 'checkpoint begin'
  * fcreate
   * Will not create (treated as fopen)
   * Will not delete file
   * Will force rollback entry of fcreate (if file exists)
 * After checkpoint begin
  * fcreate
   * Will create
   * Will first delete file
   * Will force rollback entry of fcreate (if file exists)



git-svn-id: file:///svn/toku/tokudb@15844 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:52 -04:00
Yoni Fogel
7d6f6fef69 Closes #2180 closes[t:2180] Recovery forces 'fcreate' in rollback log (when replaying fcreate log entry)
git-svn-id: file:///svn/toku/tokudb@15841 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:52 -04:00
Barry Perlman
bb8cf498bd Addresses #652, #2170, #2178 refs[t:652,2170,2178] Merge from 3.0.0-logging branch with command: svn merge -r15784:HEAD https://svn.tokutek.com/tokudb/mysql.branches/3.0.0-logging/tokudb .
git-svn-id: file:///svn/toku/tokudb@15839 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:52 -04:00
Yoni Fogel
18c2c68f7c Addresses #2164 refs[t:2164] Zombie locking contract now enforced in rename/remove
Checkpoint holds entire brt open (as zombie if necessary) instead of just holding open the cachefile.

git-svn-id: file:///svn/toku/tokudb.2037b@15740 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:06 -04:00
Yoni Fogel
a4f65b1154 Comment
git-svn-id: file:///svn/toku/tokudb.2037b@15739 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:06 -04:00
Yoni Fogel
86a917a99d Closes #2160 closes[t:2160] Implement forward and backward recovery for fdelete.
fopen forward recovery: file missing (ENOENT) is not considered an error.

git-svn-id: file:///svn/toku/tokudb.2037b@15693 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:06 -04:00
Yoni Fogel
b3df0166e4 Closes #2158 closes[t:2158] Backwards recovery of fcreate does fclose (just like backwards fopen)
git-svn-id: file:///svn/toku/tokudb.2037b@15692 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:06 -04:00
Yoni Fogel
a522ceda16 Closes #2153 refs[t:2153] fopen logged only once (unless closed and reopened). Removed logger from cachefile_close,
removed txnid from logging of fopen.

git-svn-id: file:///svn/toku/tokudb.2037b@15691 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:06 -04:00
Yoni Fogel
6feac9ff0b Closes #2064 closes[t:2064] Forward recovery of fcreate sets initial descriptor in brt.
Added test (src/tests/recover-compare-db-descriptor.abortrecover) that fails before this change, succeeds with it.

git-svn-id: file:///svn/toku/tokudb.2037b@15589 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:05 -04:00
Yoni Fogel
ae5828e7b9 Closes #2058 closes[t:2058] Recovery passes a fake DB* (zeroed out DB struct) to brt
for purposes of DB comparison function.


git-svn-id: file:///svn/toku/tokudb@15583 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:05 -04:00
Yoni Fogel
580f5caafb Addresses #2037 refs[t:2037] Merged #2037 back into main
git-svn-id: file:///svn/toku/tokudb@15562 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:04 -04:00
Rich Prohaska
805eef87be rename the recover lock file closes[t:2095]
git-svn-id: file:///svn/toku/tokudb@15558 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:04 -04:00
Yoni Fogel
d2576d5f71 Closes #2057 closes[t:2057] Add warnings about code that needs to remain in certain order to prevent recovery errors,
Fixed bug where lsn in header could be wrong (or crash during recovery).

git-svn-id: file:///svn/toku/tokudb@14856 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:03 -04:00
Rich Prohaska
46ae126764 panic brt's if recovery fails close[t:2035]
git-svn-id: file:///svn/toku/tokudb@14783 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:03 -04:00
Rich Prohaska
a39e28d36b make recovery more robust refs[t:2035]
git-svn-id: file:///svn/toku/tokudb@14751 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:03 -04:00
Yoni Fogel
1f0a5815b1 Closes #1862 closes[t:1862] LSNs are logged/chosen during the actual close, if closed during recovery, the LSN is passed into close.
git-svn-id: file:///svn/toku/tokudb@14686 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:02 -04:00
Dave Wells
3106fcce80 Fix recover-missing-logfiles test. In the process, define DB_CLOSE_DONT_TRIM_LOG flag for db_close. Also, remove some old, unused code
git-svn-id: file:///svn/toku/tokudb@14631 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:02 -04:00
Rich Prohaska
191d616ee8 add another test case for nested txn recovery [t:1960]
git-svn-id: file:///svn/toku/tokudb@14557 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:02 -04:00
Rich Prohaska
9d4f1ee78e fix some recovery tests close[t:2005] close[t:2010]
git-svn-id: file:///svn/toku/tokudb@14546 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:02 -04:00
Dave Wells
5ed2e4dc34 fix logfile trimming code, change ydb.c to exclusively use toku_checkpoint
git-svn-id: file:///svn/toku/tokudb@14522 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Rich Prohaska
0b920d5f6c require an env to create a db [t:2001]
git-svn-id: file:///svn/toku/tokudb@14513 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Rich Prohaska
d4c7ca77d9 fix up some compile issues [t:2003]
git-svn-id: file:///svn/toku/tokudb@14490 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Yoni Fogel
2fefaf6428 Closes #2003 closes [t:2003] add 'table lock on empty' log entry, and recovery logic for it.
git-svn-id: file:///svn/toku/tokudb@14489 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Rich Prohaska
0d06616161 capture the recover-staddle-txn.c test [t:2005]
git-svn-id: file:///svn/toku/tokudb@14485 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Rich Prohaska
c629cb29bf recovery bind's to filenum's [t:1998]
git-svn-id: file:///svn/toku/tokudb@14425 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Rich Prohaska
8e214a919d filter some operations during recovery close[t:1993]
git-svn-id: file:///svn/toku/tokudb@14421 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:01 -04:00
Barry Perlman
554596ce59 Addresses #1993 refs[t:1993] Added second callback to checkpoint.
git-svn-id: file:///svn/toku/tokudb@14369 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
57ddbdd9f3 some changes related to recovery and the log. close[t:1959]
git-svn-id: file:///svn/toku/tokudb@14328 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
c6c07a4ade require at least 1 log entry during recovery [t:1959]
git-svn-id: file:///svn/toku/tokudb@14315 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
94a5f224dd test missing log entries [t:1959]
git-svn-id: file:///svn/toku/tokudb@14313 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
e382a6bc88 add some txnid comparison functions [t:1972]
git-svn-id: file:///svn/toku/tokudb@14308 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Yoni Fogel
535754ec12 Closes #1973 closes[t:1973] Log entry for DELETE_ANY no longer wastes memory on 'value'
git-svn-id: file:///svn/toku/tokudb@14292 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
8d44142ba8 fix some windows build problems
git-svn-id: file:///svn/toku/tokudb@14290 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
6c5a3ebfa7 merge 1964 to main [t:1964]
git-svn-id: file:///svn/toku/tokudb@14284 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:58:00 -04:00
Rich Prohaska
dd650a9168 rename some functions [t:1966]
git-svn-id: file:///svn/toku/tokudb@14219 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
1a7354b892 merge recovery key compare function to main. close[t:1966]
git-svn-id: file:///svn/toku/tokudb@14218 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
26c68b80d9 add treeflags to the fcreate log entry close[t:1965]
git-svn-id: file:///svn/toku/tokudb@14200 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
8e2d40b9b0 merge tokudb.1844 to main close[t:1844]
git-svn-id: file:///svn/toku/tokudb@14180 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
f44c0b8ae6 merge tokudb.1960.recovery to main close[t:1950]
git-svn-id: file:///svn/toku/tokudb@14160 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
2cda63bc01 merge -c 14118 tokudb.1960 to main [t:1960]
git-svn-id: file:///svn/toku/tokudb@14119 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
3ab3cbbfcc some progress on recovery close[t:1835]
git-svn-id: file:///svn/toku/tokudb@14112 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:59 -04:00
Rich Prohaska
584c66dca2 add a timestamp to the checkpoint begin and end log entries close[t:1855]
git-svn-id: file:///svn/toku/tokudb@13992 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:58 -04:00
Dave Wells
3523924d66 logcursor changes, fix LSNs, make progress on tests [t:1926]
git-svn-id: file:///svn/toku/tokudb@13970 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:58 -04:00
Rich Prohaska
a32b708fa5 fix the recovery tests. close[t:1910]
git-svn-id: file:///svn/toku/tokudb@13835 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:58 -04:00
Yoni Fogel
110754f57c Addresses #1125 Merged nested transactions from temporary merge branch into main.
Current tests fail (not regressions, they fail as of 13461)
 * {{{x1.tdbrun}}}
 * {{{test_log(2,3,4,5,6,7,8,9,10).recover}}}
 * {{{test-recover(1,2,3).tdbrun}}}
 * {{{test1324.tdbrun}}}
ULE_DEBUG disabled (defined to 0)  Can be re-enabled for test purposes (set to 1).
refs [t:1125]
Merging into the temp branch (tokudb.main_13461+1125)
{{{svn merge --accept=postpone -r 12527:13461 ../tokudb.1125 ./}}}

Merging into main
{{{svn merge --accept=postpone -r13462:13463 ../tokudb.main_13461+1125/ ./}}}


git-svn-id: file:///svn/toku/tokudb@13464 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:56 -04:00
Rich Prohaska
363e371758 merge the enqrootentry and shutdown log entry changes to main. addresses #1847
git-svn-id: file:///svn/toku/tokudb@13453 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:56 -04:00
Dave Wells
d6e96be1f0 MERGE tokudb/toku/tokudb/1857 into main, refs [t:1857]
git-svn-id: file:///svn/toku/tokudb@13431 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:55 -04:00