Use revision from txn response header, not from put subresponse

This commit is contained in:
Vitaliy Filippov
2024-12-28 21:01:15 +03:00
parent 685af019f5
commit 561b36a4c1
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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,
+1 -1
View File
@@ -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);