Commit 3a504883 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

fixes #5920 check that deserialization succeeded before attempting to use the...

fixes #5920 check that deserialization succeeded before attempting to use the ftnode for updating stats


git-svn-id: file:///svn/toku/tokudb@52380 c7de825b-a66e-492c-adef-691d508d4ae1
parent fe919603
......@@ -1720,7 +1720,9 @@ deserialize_ftnode_header_from_rbuf_if_small_enough (FTNODE *ftnode,
r = 0;
cleanup:
toku_ft_status_update_deserialize_times(node, deserialize_time, decompress_time);
if (r == 0) {
toku_ft_status_update_deserialize_times(node, deserialize_time, decompress_time);
}
if (r != 0) {
if (node) {
toku_free(*ndd);
......@@ -2386,11 +2388,11 @@ deserialize_ftnode_from_rbuf(
r = 0;
cleanup:
t1 = toku_time_now();
deserialize_time = (t1 - t0) - decompress_time;
toku_ft_status_update_deserialize_times(node, deserialize_time, decompress_time);
if (r == 0) {
t1 = toku_time_now();
deserialize_time = (t1 - t0) - decompress_time;
toku_ft_status_update_deserialize_times(node, deserialize_time, decompress_time);
}
if (r != 0) {
// NOTE: Right now, callers higher in the stack will assert on
// failure, so this is OK for production. However, if we
......@@ -2400,7 +2402,6 @@ deserialize_ftnode_from_rbuf(
toku_free(node);
}
}
return r;
}
......
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