MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / UpdateZkTableNodeWithoutNotify

Method UpdateZkTableNodeWithoutNotify

src/nameserver/name_server_impl.cc:9047–9062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9045}
9046
9047bool NameServerImpl::UpdateZkTableNodeWithoutNotify(const TableInfo* table_info) {
9048 std::string table_value;
9049 table_info->SerializeToString(&table_value);
9050 std::string temp_path;
9051 if (table_info->db().empty()) {
9052 temp_path = zk_table_data_path_ + "/" + table_info->name();
9053 } else {
9054 temp_path = zk_db_table_data_path_ + "/" + std::to_string(table_info->tid());
9055 }
9056 if (!zk_client_->SetNodeValue(temp_path, table_value)) {
9057 LOG(WARNING) << "update table node[" << temp_path << "] failed!";
9058 return false;
9059 }
9060 LOG(INFO) << "update table node[" << temp_path << "] success";
9061 return true;
9062}
9063
9064void NameServerImpl::AddIndex(RpcController* controller, const AddIndexRequest* request, GeneralResponse* response,
9065 Closure* done) {

Callers

nothing calls this directly

Calls 3

to_stringFunction · 0.85
SetNodeValueMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected