mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
[t:2216] Bugfix with load:
If a transaction does a load(oldname,newname), and commits, the xcommit log entry MUST be fsynced, even if the user said we can turn off fsyncs. This is similar to an fdelete done by a transaction. git-svn-id: file:///svn/toku/tokudb@18789 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
3ccd21318b
commit
d4bdc29194
1 changed files with 3 additions and 0 deletions
|
@ -2661,12 +2661,15 @@ int
|
|||
toku_brt_load_recovery(TOKUTXN txn, char const * old_iname, char const * new_iname, int do_fsync, int do_log) {
|
||||
int r = 0;
|
||||
assert(txn);
|
||||
toku_txn_force_fsync_on_commit(txn); //If the txn commits, the commit MUST be in the log
|
||||
//before the (old) file is actually unlinked
|
||||
TOKULOGGER logger = toku_txn_logger(txn);
|
||||
|
||||
BYTESTRING old_iname_bs = {.len=strlen(old_iname),
|
||||
.data=toku_memdup_in_rollback(txn, old_iname, strlen(old_iname))};
|
||||
BYTESTRING new_iname_bs = {.len=strlen(new_iname),
|
||||
.data=toku_memdup_in_rollback(txn, new_iname, strlen(new_iname))};
|
||||
|
||||
r = toku_logger_save_rollback_load(txn, old_iname_bs, new_iname_bs);
|
||||
if (r==0 && do_log && logger) {
|
||||
TXNID xid = toku_txn_get_txnid(txn);
|
||||
|
|
Loading…
Add table
Reference in a new issue