Commit bd3fc584 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:4283] Closes #4283 Add comments.

git-svn-id: file:///svn/toku/tokudb@37927 c7de825b-a66e-492c-adef-691d508d4ae1
parent ed1478ff
...@@ -1896,7 +1896,7 @@ int toku_cachetable_put_with_dep_pairs( ...@@ -1896,7 +1896,7 @@ int toku_cachetable_put_with_dep_pairs(
cachetable_wait_write(ct); cachetable_wait_write(ct);
int rval; int rval;
{ {
BEGIN_CRITICAL_REGION; BEGIN_CRITICAL_REGION; // checkpoint may not begin inside critical region, detect and crash if one begins
get_key_and_fullhash(key, fullhash, get_key_and_fullhash_extra); get_key_and_fullhash(key, fullhash, get_key_and_fullhash_extra);
rval = cachetable_put_internal( rval = cachetable_put_internal(
...@@ -1925,7 +1925,7 @@ int toku_cachetable_put_with_dep_pairs( ...@@ -1925,7 +1925,7 @@ int toku_cachetable_put_with_dep_pairs(
dependent_dirty dependent_dirty
); );
END_CRITICAL_REGION; END_CRITICAL_REGION; // checkpoint after this point would no longer cause a threadsafety bug
} }
cachetable_unlock(ct); cachetable_unlock(ct);
return rval; return rval;
...@@ -2199,7 +2199,7 @@ int toku_cachetable_get_and_pin_with_dep_pairs ( ...@@ -2199,7 +2199,7 @@ int toku_cachetable_get_and_pin_with_dep_pairs (
{ {
BEGIN_CRITICAL_REGION; BEGIN_CRITICAL_REGION; // checkpoint may not begin inside critical region, detect and crash if one begins
// //
// A checkpoint must not begin while we are checking dependent pairs or pending bits. // A checkpoint must not begin while we are checking dependent pairs or pending bits.
...@@ -2236,7 +2236,7 @@ int toku_cachetable_get_and_pin_with_dep_pairs ( ...@@ -2236,7 +2236,7 @@ int toku_cachetable_get_and_pin_with_dep_pairs (
dependent_dirty dependent_dirty
); );
END_CRITICAL_REGION; END_CRITICAL_REGION; // checkpoint after this point would no longer cause a threadsafety bug
} }
r = maybe_flush_some(ct, 0); r = maybe_flush_some(ct, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment