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

Method SendSnapshot

src/client/tablet_client.cc:438–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438bool TabletClient::SendSnapshot(uint32_t tid, uint32_t remote_tid, uint32_t pid,
439 const std::string& endpoint,
440 std::shared_ptr<TaskInfo> task_info) {
441 ::fedb::api::SendSnapshotRequest request;
442 request.set_tid(tid);
443 request.set_pid(pid);
444 request.set_endpoint(endpoint);
445 request.set_remote_tid(remote_tid);
446 if (task_info) {
447 request.mutable_task_info()->CopyFrom(*task_info);
448 }
449 ::fedb::api::GeneralResponse response;
450 bool ok =
451 client_.SendRequest(&::fedb::api::TabletServer_Stub::SendSnapshot,
452 &request, &response, FLAGS_request_timeout_ms, 1);
453 if (ok && response.code() == 0) {
454 return true;
455 }
456 return false;
457}
458
459bool TabletClient::LoadTable(const std::string& name, uint32_t id, uint32_t pid,
460 uint64_t ttl, uint32_t seg_cnt) {

Callers 1

HandleClientSendSnapshotFunction · 0.45

Calls 2

SendRequestMethod · 0.80
codeMethod · 0.80

Tested by

no test coverage detected