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

Method ShowOPStatus

src/client/ns_client.cc:203–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203bool NsClient::ShowOPStatus(::fedb::nameserver::ShowOPStatusResponse& response,
204 const std::string& name, uint32_t pid,
205 std::string& msg) {
206 ::fedb::nameserver::ShowOPStatusRequest request;
207 if (!name.empty()) {
208 request.set_name(name);
209 request.set_db(GetDb());
210 }
211 if (pid != INVALID_PID) {
212 request.set_pid(pid);
213 }
214 bool ok =
215 client_.SendRequest(&::fedb::nameserver::NameServer_Stub::ShowOPStatus,
216 &request, &response, FLAGS_request_timeout_ms, 1);
217 msg = response.msg();
218 if (ok && response.code() == 0) {
219 return true;
220 }
221 return false;
222}
223
224bool NsClient::CancelOP(uint64_t op_id, std::string& msg) {
225 ::fedb::nameserver::CancelOPRequest request;

Callers 1

HandleNSShowOPStatusFunction · 0.45

Calls 4

SendRequestMethod · 0.80
msgMethod · 0.80
codeMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected