vesoft-inc/nebula

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

Aperta

#4205 aperta il 24 apr 2022

 (11 commenti) (1 reazione) (0 assegnatari)C++ (1144 fork)batch import
affects/nonehacktoberfestseverity/nonetype/bugwontfix

Metriche repository

Star
 (9828 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor