| 4371 | } |
| 4372 | |
| 4373 | bool TabletImpl::ChooseTableRootPath(uint32_t tid, uint32_t pid, std::string& path) { |
| 4374 | std::string root_path; |
| 4375 | bool ok = ChooseDBRootPath(tid, pid, root_path); |
| 4376 | if (!ok) { |
| 4377 | PDLOG(WARNING, "table db path doesn't found. tid %u, pid %u", tid, pid); |
| 4378 | return false; |
| 4379 | } |
| 4380 | path = root_path + "/" + std::to_string(tid) + "_" + std::to_string(pid); |
| 4381 | if (!::fedb::base::IsExists(path)) { |
| 4382 | PDLOG(WARNING, "table db path doesn`t exist. tid %u, pid %u", tid, pid); |
| 4383 | return false; |
| 4384 | } |
| 4385 | return true; |
| 4386 | } |
| 4387 | |
| 4388 | bool TabletImpl::GetTableRootSize(uint32_t tid, uint32_t pid, uint64_t& size) { |
| 4389 | std::string table_path; |