Commit 40ef154d authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4745], only call toku_update_descriptor in deserialize_brtheader_versioned...

[t:4745], only call toku_update_descriptor in deserialize_brtheader_versioned if we are upgrading header

git-svn-id: file:///svn/toku/tokudb@42069 c7de825b-a66e-492c-adef-691d508d4ae1
parent ab3f4990
...@@ -3059,12 +3059,14 @@ deserialize_brtheader_versioned(int fd, struct rbuf *rb, struct brt_header **brt ...@@ -3059,12 +3059,14 @@ deserialize_brtheader_versioned(int fd, struct rbuf *rb, struct brt_header **brt
// anymore. Since the header is going to think it's the current // anymore. Since the header is going to think it's the current
// version if it gets written out, we need to write the descriptor in // version if it gets written out, we need to write the descriptor in
// the new format (without those bytes) before that happens. // the new format (without those bytes) before that happens.
if (version <= BRT_LAYOUT_VERSION_13) {
int r = toku_update_descriptor(h, &h->cmp_descriptor, fd); int r = toku_update_descriptor(h, &h->cmp_descriptor, fd);
if (r != 0) { if (r != 0) {
errno = r; errno = r;
e = DS_ERRNO; e = DS_ERRNO;
goto exit; goto exit;
} }
}
exit: exit:
if (e != DS_OK && h != NULL) { if (e != DS_OK && h != NULL) {
toku_free(h); toku_free(h);
......
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