Use revision from txn response header, not from put subresponse
This commit is contained in:
@@ -192,7 +192,7 @@ resume_3:
|
|||||||
}
|
}
|
||||||
} while (!parent->etcd_result["succeeded"].bool_value());
|
} while (!parent->etcd_result["succeeded"].bool_value());
|
||||||
// Save into inode_config for library users to be able to take it from there immediately
|
// Save into inode_config for library users to be able to take it from there immediately
|
||||||
new_cfg.mod_revision = parent->etcd_result["responses"][0]["response_put"]["header"]["revision"].uint64_value();
|
new_cfg.mod_revision = parent->etcd_result["header"]["revision"].uint64_value();
|
||||||
parent->cli->st_cli.insert_inode_config(new_cfg);
|
parent->cli->st_cli.insert_inode_config(new_cfg);
|
||||||
result = (cli_result_t){
|
result = (cli_result_t){
|
||||||
.err = 0,
|
.err = 0,
|
||||||
@@ -269,7 +269,7 @@ resume_4:
|
|||||||
}
|
}
|
||||||
} while (!parent->etcd_result["succeeded"].bool_value());
|
} while (!parent->etcd_result["succeeded"].bool_value());
|
||||||
// Save into inode_config for library users to be able to take it from there immediately
|
// Save into inode_config for library users to be able to take it from there immediately
|
||||||
new_cfg.mod_revision = parent->etcd_result["responses"][0]["response_put"]["header"]["revision"].uint64_value();
|
new_cfg.mod_revision = parent->etcd_result["header"]["revision"].uint64_value();
|
||||||
parent->cli->st_cli.insert_inode_config(new_cfg);
|
parent->cli->st_cli.insert_inode_config(new_cfg);
|
||||||
result = (cli_result_t){
|
result = (cli_result_t){
|
||||||
.err = 0,
|
.err = 0,
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ resume_2:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Save into inode_config for library users to be able to take it from there immediately
|
// Save into inode_config for library users to be able to take it from there immediately
|
||||||
cfg.mod_revision = parent->etcd_result["responses"][0]["response_put"]["header"]["revision"].uint64_value();
|
cfg.mod_revision = parent->etcd_result["header"]["revision"].uint64_value();
|
||||||
if (new_name != "")
|
if (new_name != "")
|
||||||
{
|
{
|
||||||
parent->cli->st_cli.inode_by_name.erase(image_name);
|
parent->cli->st_cli.inode_by_name.erase(image_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user