vesoft-inc/nebula

disk manager: boost::filesystem::status not implemented in arcch64 linux 4.14

Aberta

#4.205 aberto em 24 de abr. de 2022

 (11 comentários) (1 reação) (0 responsável)C++ (1.144 forks)batch import
affects/nonehacktoberfestseverity/nonetype/bugwontfix

Métricas do repositório

Stars
 (9.828 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Please check the FAQ documentation before raising an issue

Describe the bug (required)

reported via https://discuss.nebula-graph.com.cn/t/topic/8487/37?u=wey , boost::filesystem::status() not implemented was encountered during meta boot.

maybe during boost::filesystem::exists in follow function ?

DiskManager::DiskManager(const std::vector<std::string>& dataPaths,
                         std::shared_ptr<thread::GenericWorker> bgThread)
    : bgThread_(bgThread) {
  try {
    // atomic is not copy-constructible
    std::vector<std::atomic_uint64_t> freeBytes(dataPaths.size() + 1);
    Paths* paths = new Paths();
    paths_.store(paths);
    size_t index = 0;
    for (const auto& path : dataPaths) {
      auto absolute = boost::filesystem::absolute(path);
      if (!boost::filesystem::exists(absolute)) {
        if (!boost::filesystem::create_directories(absolute)) {
          LOG(FATAL) << folly::sformat("DataPath:{} does not exist, create failed.", path);
        }
      } else if (!boost::filesystem::is_directory(absolute)) {
        LOG(FATAL) << "DataPath is not a valid directory: " << path;
      }
      auto canonical = boost::filesystem::canonical(path);
      auto info = boost::filesystem::space(canonical);
      paths->dataPaths_.emplace_back(std::move(canonical));
      freeBytes[index++] = info.available;
    }
    freeBytes_ = std::move(freeBytes);
  } catch (boost::filesystem::filesystem_error& e) {
    LOG(FATAL) << "DataPath invalid: " << e.what();
  }
  if (bgThread_) {
    bgThread_->addRepeatTask(FLAGS_disk_check_interval_secs * 1000, &DiskManager::refresh, this);
  }
}

Your Environments (required)

  • OS: uname -a kernel 4.14, aarch64
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id : 3.0.2

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

Guia do colaborador