Commit fbac0c9b authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1670 fix bug in descriptor versino upgrades.

If descriptor contents stay the same but version goes up, record new version (instead of ignore it).


git-svn-id: file:///svn/toku/tokudb@11263 c7de825b-a66e-492c-adef-691d508d4ae1
parent a526a718
...@@ -2995,7 +2995,8 @@ int toku_brt_open(BRT t, const char *fname, const char *fname_in_env, int is_cre ...@@ -2995,7 +2995,8 @@ int toku_brt_open(BRT t, const char *fname, const char *fname_in_env, int is_cre
} }
assert(t->h); assert(t->h);
if (t->did_set_descriptor) { if (t->did_set_descriptor) {
if (t->h->descriptor.dbt.size!=t->temp_descriptor.dbt.size || if (t->h->descriptor.version!=t->temp_descriptor.version ||
t->h->descriptor.dbt.size!=t->temp_descriptor.dbt.size ||
memcmp(t->h->descriptor.dbt.data, t->temp_descriptor.dbt.data, t->temp_descriptor.dbt.size)) { memcmp(t->h->descriptor.dbt.data, t->temp_descriptor.dbt.data, t->temp_descriptor.dbt.size)) {
if (t->temp_descriptor.version <= t->h->descriptor.version) { if (t->temp_descriptor.version <= t->h->descriptor.version) {
//Changing descriptor requires upping the version. //Changing descriptor requires upping the version.
......
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