Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
63db0022
Commit
63db0022
authored
Apr 12, 2012
by
Zardosht Kasheff
Committed by
Yoni Fogel
Apr 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[t:4718], make fix
git-svn-id:
file:///svn/toku/tokudb@41788
c7de825b-a66e-492c-adef-691d508d4ae1
parent
56182a15
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
newbrt/roll.c
newbrt/roll.c
+37
-0
No files found.
newbrt/roll.c
View file @
63db0022
...
@@ -63,6 +63,24 @@ toku_commit_fdelete (u_int8_t file_was_open,
...
@@ -63,6 +63,24 @@ toku_commit_fdelete (u_int8_t file_was_open,
char
*
fname_in_env
=
fixup_fname
(
&
bs_fname
);
char
*
fname_in_env
=
fixup_fname
(
&
bs_fname
);
char
*
fname_in_cwd
=
toku_cachetable_get_fname_in_cwd
(
txn
->
logger
->
ct
,
fname_in_env
);
char
*
fname_in_cwd
=
toku_cachetable_get_fname_in_cwd
(
txn
->
logger
->
ct
,
fname_in_env
);
// bug fix for #4718
// bug was introduced in with fix for #3590
// Before Maxwell (and fix for #3590),
// the recovery log was fsynced after the xcommit was loged but
// before we processed rollback entries and before we released
// the row locks (in the lock tree). Due to performance concerns,
// the fsync was moved to after the release of row locks, which comes
// after processing rollback entries. As a result, we may be unlinking a file
// here as part of a transactoin that may abort if we do not fsync the log.
// So, we fsync the log here.
//
// Because committing fdeletes should be a rare operation, we do not bother
// yielding the ydb lock before performing the fsync.
if
(
txn
->
logger
)
{
r
=
toku_logger_fsync_if_lsn_not_fsynced
(
txn
->
logger
,
txn
->
do_fsync_lsn
);
assert_zero
(
r
);
}
r
=
unlink
(
fname_in_cwd
);
r
=
unlink
(
fname_in_cwd
);
assert
(
r
==
0
||
errno
==
ENOENT
);
assert
(
r
==
0
||
errno
==
ENOENT
);
toku_free
(
fname_in_env
);
toku_free
(
fname_in_env
);
...
@@ -433,6 +451,25 @@ toku_commit_load (BYTESTRING old_iname,
...
@@ -433,6 +451,25 @@ toku_commit_load (BYTESTRING old_iname,
else
{
else
{
assert
(
r
==
ENOENT
);
assert
(
r
==
ENOENT
);
}
}
// bug fix for #4718
// bug was introduced in with fix for #3590
// Before Maxwell (and fix for #3590),
// the recovery log was fsynced after the xcommit was loged but
// before we processed rollback entries and before we released
// the row locks (in the lock tree). Due to performance concerns,
// the fsync was moved to after the release of row locks, which comes
// after processing rollback entries. As a result, we may be unlinking a file
// here as part of a transactoin that may abort if we do not fsync the log.
// So, we fsync the log here.
//
// Because committing fdeletes should be a rare operation, we do not bother
// yielding the ydb lock before performing the fsync.
if
(
txn
->
logger
)
{
r
=
toku_logger_fsync_if_lsn_not_fsynced
(
txn
->
logger
,
txn
->
do_fsync_lsn
);
assert_zero
(
r
);
}
char
*
fname_in_cwd
=
toku_cachetable_get_fname_in_cwd
(
txn
->
logger
->
ct
,
fname_in_env
);
char
*
fname_in_cwd
=
toku_cachetable_get_fname_in_cwd
(
txn
->
logger
->
ct
,
fname_in_env
);
r
=
unlink
(
fname_in_cwd
);
r
=
unlink
(
fname_in_cwd
);
assert
(
r
==
0
||
errno
==
ENOENT
);
assert
(
r
==
0
||
errno
==
ENOENT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment