Commit 1a382c07 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel
Browse files

[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 6d34ab52
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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
    // version if it gets written out, we need to write the descriptor in
    // 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);
        if (r != 0) {
            errno = r;
            e = DS_ERRNO;
            goto exit;
        }
    }
exit:
    if (e != DS_OK && h != NULL) {
        toku_free(h);